.htaccess tutorial

htaccess Elite


Pattern Recognition Problem..

Ask your mod_rewrite and Redirection questions here, and get answers!

Pattern Recognition Problem..

New postby GT500Grad » 12 Dec 2009 20:14

I'm implementing twitter to my site and since I'm using codeigniters clean urls, I need to redirect the twitter callback url to a method url. Below is the url that twitter is calling back.

...twitter_demo/dummy?oauth_token=BGvrWnAWkA5uTvZViC7CERbBLKGRvZD1oiPPo6BDOA

Below is the Rewrite that I have in the htaccess.
RewriteRule ^twitter_demo/dummy?oauth_token=(.*+)$ twitter_demo/dummy/$1 [NC,L]

I need to pull out the oauth_token and set it to the $1 var. Do you see anything wrong with the syntax? It seems to be having a hard time finding the pattern and setting it. I've tried a multiple different things like, (.*), (.+), (.*+), but none of them seem to work on the string.

Any ideas?
GT500Grad
 
Posts: 1
Joined: 12 Dec 2009 19:33

Return to Redirect or Rewrite Questions