Welcome Guest, Not a member yet? Register   Sign In
.htaccess - convert querystring variables into url segments?
#1

[eluser]Matthew Pennell[/eluser]
I'm having an .htaccess problem, hopefully someone can help me out. Smile

I'm working on something that uses a third-party remote API which it accesses via cURL, but the API only uses querystrings to return the authorization key to my app. So I can set the callback URL, but it will always send back the response as:

http://localhost/myapp/controller/method...d1e1f1f1e1

Obviously this isn't much use to CodeIgniter, so I thought I could use .htaccess to intercept those requests and rewrite the url to make the token into a url segment:

http://localhost/myapp/controller/method...d1e1f1f1e1

Here's my .htaccess:

Code:
RewriteEngine on

RewriteCond $1 !^(index\.php|images|robots\.txt)

RewriteRule ^(.*)\?auth_token=(.*)$ /index.php/$1$2 [L]
RewriteRule ^(.*)$ /index.php/$1 [L]

Unfortunately, this setup gives me a 500 Internal Server Error. Sad

Anyone know how to do this properly?


Messages In This Thread
.htaccess - convert querystring variables into url segments? - by El Forum - 03-19-2008, 07:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB