Hi,
I’m new to codeigniter but a big fan already. I have a question on how to make something work related to URI routing.
I have a button on my site that redirects a user to an external site with a callback url. I cannot control the use of query strings in the callback url format. The callback url looks something like:
http://www.mysite.com/index.php/mycontroller?auth_token=88797abc89798dd444334
I’m trying to handle this type of query and have it call a “processAuth” function on “mycontroller”. So I need to map the above callback to something like:
http://www.mysite.com/index.php/mycontroller/processAuth/88797abc89798dd444334
The above call to processAuth works fine.
I can’t figure out how to use URI routing with reqular expressions to solve this problem. I tried adding various routes like:
$route[‘mycontroller?auth_token=(.+)’] = “mycontroller/processAuth/$1”;
$route[‘mycontroller\?auth_token=(.+)’] = “mycontroller/processAuth/$1”;
$route[’(mycontroller\?auth_token=)(.+)’] = “mycontroller/processAuth/$2”;
Can someone help me out? I’m not even sure I’m on the right track…is there a better/easier way?
Thanks in advance.
