Apache 排除文件夹";“网络”;in.htaccess不起作用

Apache 排除文件夹";“网络”;in.htaccess不起作用,apache,.htaccess,Apache,.htaccess,我想排除my.htaccess中的子文件夹“web”,但它不起作用 .htaccess位于根目录中。“web”文件夹是它的一个子文件夹 所以,我试过这个: <IfModule mod_rewrite.c> RewriteEngine On # turn empty requests into requests for "index.php", # keeping the query string intact RewriteRule ^$ index.

我想排除my.htaccess中的子文件夹“web”,但它不起作用

.htaccess位于根目录中。“web”文件夹是它的一个子文件夹

所以,我试过这个:

<IfModule mod_rewrite.c>
    RewriteEngine On
    # turn empty requests into requests for "index.php",
    # keeping the query string intact
    RewriteRule ^$ index.php [QSA]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !favicon.ico$

    # Folders to exclude from rewrite divided by Pipe goes here:
    RewriteCond %{REQUEST_URI} /.+\/web\/.+/
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

重新启动发动机
#将空请求转换为对“index.php”的请求,
#保持查询字符串的完整性
重写规则^$index.php[QSA]
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}!favicon.ico$
#要从重写中排除的文件夹按管道划分如下:
重写条件%{REQUEST\u URI}/+\/web\/+/
重写规则^(.*)$index.php[QSA,L]
我想排除.htaccess中的子文件夹“web”

在其他规则之前使用类似规则排除某些文件或目录

RewriteEngine On

# Folders / files to exclude from rewrite divided by Pipe goes here:
RewriteRule (^|/)web(/|$) - [L,NC]

# turn empty requests into requests for "index.php",
# keeping the query string intact
RewriteRule ^$ index.php [QSA]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !favicon.ico$
RewriteRule ^(.*)$ index.php [QSA,L]

您的意思是添加一个
在那里?谢谢,对我来说很好。我整晚都在想这个复杂的阿帕奇方言。:-)编辑:我认为另一个原因是,我使用了它的绝对路径,而不是web服务器锚。不客气,是的,重写规则中的所有内容都是从
DocumenRoot