Dragen Posted October 16, 2007 Share Posted October 16, 2007 Hi, I'm using htaccess to re-direct an image link to a php file, with the get variables set within the url. something like this: http://localhost/counter/3/W300/H200/img.png I've got my htaccss working fine for that. It takes the bits between 'counter' and 'img.png' and turns them into gets. Now what I'm trying to do is also to use get variables in the image url, like this: http://localhost/counter/3/W300/H200/img.png?color=32&width=1280&height=800 and get htaccess to keep the variables when it rewrites the url. Unfortunately it removes them and I can't seem to get them with htaccess. Here's my htacces I'm using: RewriteRule ^counter/(([a-zA-Z0-9.]+/)+)img.png$ counter.php?p=$1$3 [L] This one gets the bits between counter and img.png. This is what I'm using to try and get the GET vars: RewriteRule ^counter/(([a-zA-Z0-9.]+/)+)img.png([a-zA-z0-9./]+)?$ counter.php?p=$1$3 [L] But it's not working. Any suggestions? note: before anyone says anything, I've tried using $2, but because of how my rewrite is written, $2 comes out as the last item in the 'counter' -> 'img.png' section.. Thanks Quote Link to comment Share on other sites More sharing options...
Dragen Posted October 16, 2007 Author Share Posted October 16, 2007 Nevermind. I've found the answer here: http://www.phpfreaks.com/forums/index.php/topic,136602.0.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.