![]() |
Problem with URLs - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with URLs (/showthread.php?tid=32480) Pages:
1
2
|
Problem with URLs - El Forum - 07-24-2010 [eluser]bondjp[/eluser] I have this problemn and just don't know how to solve it. When i put this url: Code: http://mysite.com/memb/postback/postback.php?sid=10&name=myname If i put this like it should be : Code: http://mysite.com/memb/postback.php?sid=10&name=myname Putting PATH_AUTO it sends me to the homepage. How can i make this work? Library: Code: class MY_Input extends CI_Input Config: Code: $config['uri_protocol'] = "REQUEST_URI"; Controller "memb": Code: function postback(){ htaccess Code: <IfModule mod_rewrite.c> Problem with URLs - El Forum - 07-24-2010 [eluser]pickupman[/eluser] Wouldn't it be Code: http://mysite.com/memb/postback?sid=10&name=myname Problem with URLs - El Forum - 07-24-2010 [eluser]bondjp[/eluser] [quote author="pickupman" date="1280039072"]Wouldn't it be Code: http://mysite.com/memb/postback?sid=10&name=myname Yes but if i put it like that i get a 404... Problem with URLs - El Forum - 07-24-2010 [eluser]bondjp[/eluser] Another thing is if i put like this: Code: http://mysite.com/memb/postback I works. but if i put like this (add .php): Code: http://mysite.com/memb/postback.php I get a 404.... Problem with URLs - El Forum - 07-24-2010 [eluser]pickupman[/eluser] Ah, you didn't mentioned you tried that url. You had .php in the url. Problem with URLs - El Forum - 07-24-2010 [eluser]pickupman[/eluser] that's becuase postback.php is not a url. Remember index.php is doing all the work. So it's actually index.php/memb/postback The index.php is just hidden with .htaccess. Everything is just a query string to it. Problem with URLs - El Forum - 07-24-2010 [eluser]bondjp[/eluser] Ok. So how can i solve this? Problem with URLs - El Forum - 07-24-2010 [eluser]pickupman[/eluser] Don't use .php in your url's. It's not needed. Problem with URLs - El Forum - 07-24-2010 [eluser]bondjp[/eluser] [quote author="pickupman" date="1280040327"]Don't use .php in your url's. It's not needed.[/quote] The problem is that the ad network uses this format in order to setup the postback url so i can have GET variables... Can i use it like? : Code: http://mysite.com/memb/postback?id=76&name=namesds If so i still get a 404 with this url... Problem with URLs - El Forum - 07-24-2010 [eluser]pickupman[/eluser] Check out this [url="http://www.askaboutphp.com/58/codeigniter-mixing-segment-based-url-with-querystrings.html"]post[/url]. I have used this before, and it worked. It seems you are close, but you have the code in the input class. It should be in your controller constructor as outlined in the post. |