ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Combine CodeIgniter URL with conventional URL

October 28, 2010 12:54am

Subscribe [2]
  • #1 / Oct 28, 2010 12:54am

    dartmouth114

    3 posts

    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 : http://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 / Oct 28, 2010 1:07am

    tonanbarbarian

    650 posts

    you should see if you can change the url to the following: http://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
    http://www.example.com/index.php?c=product&m=category&token=ABCDEF

  • #3 / Oct 28, 2010 1:55pm

    dartmouth114

    3 posts

    Yes, that’s right… Query String is what I’m looking for..

    Thanks alot.. 😊

  • #4 / Oct 28, 2010 6:14pm

    pbreit

    206 posts

    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 / Oct 29, 2010 1:39am

    dartmouth114

    3 posts

    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.. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases