Here is the directory outline:
/
/css
/js
/admin
/config
/etc...
So this is what I would like:
/ <-- Mod re-write for this directory only, skip the rest
/css
/js
/admin
/config
/etc...
.htaccess file:
# Turn rewrite engine on
RewriteEngine On
# Set the base path
RewriteBase /
# now the rewriting rules
RewriteRule ^([0-9A-Za-z]+)/?$ /query.php?id=$1 [L]
Would like to skip all directories except the root directory, how do I do this?
Another solution: Put one of these rules in front of your rules:
The last named rule will work for any existing directory but only if placed in the .htaccess file in the document root of the server. Otherwise you will need to adjust the
RewriteCondexpression%{DOCUMENT_ROOT}$0with the specific path, e.g.%{DOCUMENT_ROOT}foo/bar/$0.