Routing problem - 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: Routing problem (/showthread.php?tid=5595) |
Routing problem - El Forum - 01-28-2008 [eluser]cortina[/eluser] I've got an issue with a URL containing a query string that's being appended by a third party payment processor when returning users to a site I'm building. The URL I want is: Code: http://www.mysite.com/checkout/complete Code: ?oid=1234567 According to the user guide I should be able to route this using a regex: Code: $route['checkout/(complete\?oid\=([0-9]+))'] = 'checkout/complete'; But I'm still getting 404's after trying a bunch of alternatives. Does anyone have any suggestions? TIA Rob Routing problem - El Forum - 01-28-2008 [eluser]cortina[/eluser] Damn, 16 views and no replies Anyone??? Cheers Rob Routing problem - El Forum - 01-28-2008 [eluser]wiredesignz[/eluser] Phew that took some trial and error settings wise. (never having used $_GET) Try setting $config['uri_protocol'] = "PATH_INFO"; and removing your regex route altogether. Also set $config['enable_query_strings'] = TRUE; This worked to the point that I was able to use the query ?oid=12345 and get to the controller and the $_GET variable is set. Routing problem - El Forum - 01-28-2008 [eluser]cortina[/eluser] Nice one! That got it Cheers Rob |