I am trying to do a simple cheat on the mod_rewrite url where /category/item rewrites /category/index.php?id=item . In the /category directory, I have this in my .htaccess file:
Options +FollowSymLinks RewriteEngine on RewriteBase /category/ RewriteRule ^(.+)$ index.php?id=$1 [L]
It sends the request to the index.php script just fine, but instead of searching for βitemβ in the id variable, I get βindex.phpβ. That is, /category/item seems to be rewritten to /category/index.php?id=index.php .
I tried endless variations, with different / no RewriteBase and other changes, but nothing works. Any idea where I was wrong?
source share