I have the following rewrite (trimmed it down for posting purposes). How can I target the directory above (../, or for search engines dot dot slash)? I tried escaping the periods \ . (without the space, Stackoverflow doesn’t like it apparently) though I’m still getting an HTTP 404 error. I’m sure this is simple though I haven’t found anything online yet where someone got a working answer.
RewriteEngine on
RewriteRule ^(path1\/|path2\/) - [L]
RewriteRule !\.(css|cur|gif|gz|xhtml)$ index.php
EDIT
This works on ONLY the directory, how can we adjust it so that it applies to all the files in directory as well?
RewriteRule .*\/scripts\/*$ scripts\/$1 [L]
1 Answer