开发者

.htaccess redirect anywhere except a specific directory

I'd like to edit .htaccess so that it would display a redirect to my /ma开发者_C百科in/ directory when I visit a page that is not in the /main/ directory. How would I go on about doing this?


I think:

RewriteCond %{REQUEST_FILENAME} !^main/.*
RewriteRule ^(.*)$ redirect_file.php [L]

would do it

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜