从 htaccess 中排除文件夹 [英] Exclude folder from htaccess

查看:56
本文介绍了从 htaccess 中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,它使用 htaccess 来使用漂亮的 URL.但是,我希望 htaccess 文件单独留下整个文件夹,并且完全是内容.我的 htaccess 文件的内容是:

I have a site which uses htaccess in order to use nice URLs. However I want the htaccess file to leave alone a whole folder and it's content completely. The content of my htaccess file is:

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1

我应该如何完成上面的代码以完全排除名为admin"的文件夹

How should I complete the above code to EXCLUDE completely the folder named "admin"

非常感谢!

推荐答案

你也可以在你想忽略的文件夹中放一个新的 .htaccess 文件,说:

You could also put a new .htaccess file in the folder you want to ignore, saying:

RewriteEngine Off

这篇关于从 htaccess 中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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