Redirecting Everything Except One Folder From Within A Subfolder
I have a .htaccess rule in the root of my site that stops anyone going to any folder except /myfolder for example.
Inside /myfolder I have 10 directories. I need to stop access to all of these directories except for example /myfolder/myotherfolder.
The code I have so far (which doesn't work) is this:
<IfModule mod_rewrite.开发者_如何学JAVAc>
RewriteEnine On
RewriteCond %{REQUEST_URI} !^(/myfolder/myotherfolder/)
RewriteRule ^(.*)$ http://mysite.co.uk/ [L,R=301,NC]
</IfModule>
Any help would be amazing. Thank you!
You misspelled "RewriteEngine"
精彩评论