开发者

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"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜