Here is a basic explain of what’s my problem:
I need to rewrite from http://domain.com/file.php?name=xxxx
to http://domain.com/xxxx
So, the problem is: I have some directories like images, css, include, etc., where files are stored, and instead of rewrite to http://domain.com/xxxx is going to directory itself.
here is my scrappy .htaccess file:
RewriteEngine On
RewriteRule ^index.html$ index.php [QSA,L]
RewriteRule ^help.html$ help.php [QSA,L]
RewriteRule ^([^/]+)\.xml$ info.php?id=$1 [QSA,L]
RewriteRule ^(\w+)$ file.php?name=$1 [L]
Any ideas how to fixit, and allow my stored files in that directories keep working?
Here’s a rewrite rule that will redirect all requests to a page handler if the file doesn’t actually exist at that location: