htaccess的 - 不要在这种情况下,重写 [英] htaccess - do not rewrite in this case

查看:221
本文介绍了htaccess的 - 不要在这种情况下,重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的访问文件看起来是这样的:

My access file looks like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

不过,我有,我想通过URL http://mysite.com/facebook作为usuall访问的目录名为Facebook的。我需要什么添加到上面,这样它忽略(不重写)这个目录?

But I have a directory called facebook that I want to access as usuall through the URL http://mysite.com/facebook. What do I need to add to the above so that it ignores (does not rewrite) this directory?

推荐答案

补充:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI}  !^/facebook
RewriteRule ^.*$ index.php [NC,L]

这篇关于htaccess的 - 不要在这种情况下,重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆