I'm hoping someone has some ideas for me. I'm trying to use a RewriteRule in my .htaccess file to change a url from a user friendly version to a version that will return a $_GET array in php.
My .htaccess file has the following.
RewriteEngine on RewriteBase /htdocs/ RewriteRule ^page/(.*)$ /index.php?var=$1 [L] RewriteRule ^articles/(.*)$ /articles.php?article=$1 [L]
The first RewriteRule works great. It's the second one that is causing me a problem. If you go to http://www.yourparty....com/articles/7 for example I would expect the rewriterule to change that to http://www.yourparty...s.php?article=7. However, I am not receiving a $_GET array in php. I just get an empty array. I've doing a print_r on the $_GET array to see what it is returning.
If I do the user friendly URL then I get nothing in the array, if I do the articles.php? url manually then I do get the $_GET array.
Does anyone have any ideas as to why the first rewrite rule would work but not the second? Am I just overlooking some silly thing here?
Thanks for any help!!!
This post has been edited by timchase01: 01 April 2009 - 07:06 PM