的.htaccess例外特定的文件夹 [英] .htaccess exception to particular folders

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

问题描述

下面是我的.htaccess code位于根文件夹

Here is my .htaccess code which is located in the root folder

<IfModule mod_rewrite.c>
    RewriteEngine On 
    RewriteRule ^(.*)$ public/$1 [L]
    RewriteRule ^(.*)$ public/blog/$1 [L]
</IfModule>

下面我加入 /公共所有URL请求(也公开/博客)

Here i am adding /public for all the url requests (also public/blog)

我需要命名为 code 一个新的文件夹添加到公用文件夹有这个的.htaccess规则不应适用。 (它应该像普通文件系统)

I need to add a new folder named as code to the public folder there this .htaccess rule should not apply. (It should like regular file system)

我怎样才能排除特定文件夹中的规则。

How can i exclude the rules for particular folder.

推荐答案

您可以插入这条规则的略低于 RewriteEngine叙述在

You can insert this rule just below RewriteEngine On line:

RewriteCond %{THE_REQUEST} /code
RewriteRule ^ - [L]

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

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