- htaccess - Rewrite PHP $_GET only in root
- RewriteEngine on
- # ignore existing files (only apply to non-file)
- RewriteCond %{REQUEST_FILENAME} !-f
- #ignore folders (only apply to non-folder)
- RewriteCond %{REQUEST_FILENAME} !-d
- # here you might also want to exclude some specific locations...
- RewriteCond %{REQUEST_URI} !^(images|css|js)/
- # finally, apply the rule...
- RewriteRule ^(w+)$ index.php?p=$1 [L]