I’m using the following RewriteRule in my .htaccess, which is working fine.
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
However, there is one thing that is troubling me:
- I have a subfolder called “folder”
- I request the URL http://www.example.com/folder
- The URL changes to http://www.example.com/folder/?q=folder
Any other URL works as expected, including http:// http://www.example.com/folder/
It doesn’t make a difference as far as the GET variable is concerned, of course.
But it would be nicer if the argument would not become visible in the browser. I tried adding a slash before index.php, but that resulted in an Internal Server Error.
Any help would be appreciated!
Add this before your RewriteRule: