Welcome Guest, Not a member yet? Register   Sign In
Combine CodeIgniter URL with conventional URL
#1

[eluser]dartmouth114[/eluser]
So, I'm using Google Authsub in my CI code. The problem is, when Google Authsub finishes, it will redirect the browser to my website with conventional URL GET, for example : www.example.com/product/category?token=ABCDEF

You see the ?token=ABCDEF ..

How do I catch the token value in my CodeIgniter code..?

Does anybody know? I'm totally confused..

Thanks,
Joe
#2

[eluser]tonanbarbarian[/eluser]
you should see if you can change the url to the following: www.example.com/product/category/token/ABCDEF
this makes it a valid CI link

You could probably use the .htaccess and rewrite to do this

the other option is to change your CI config to use querystrings so that the url would be
www.example.com/index.php?c=product&m=category&token=ABCDEF
#3

[eluser]dartmouth114[/eluser]
Yes, that's right... Query String is what I'm looking for..

Thanks alot.. Smile
#4

[eluser]pbreit[/eluser]
Check this lengthy thread for some workarounds to CodeIngiter's lack of querystring support:
http://ellislab.com/forums/viewthread/159382/

You may not want to "enable querystrings" in config because this will changes all of your URLs.
#5

[eluser]dartmouth114[/eluser]
Ohh.. Thanks for the notice... I finally chose to use $_SERVER['REQUEST_URI'] instead to parse the token, since it's only just one link.. I wouldn't want to mess up the other code with the query string.. Smile




Theme © iAndrew 2016 - Forum software by © MyBB