.htaccess忽略目录
我有一个使用seo URL的modx网站。工作起来很有魅力 现在我希望现有目录中的现有文件也能正确显示,但我收到的是默认的modx404页面 modx,网站本身位于webroot中,并使用以下.htaccess.htaccess忽略目录,.htaccess,.htaccess,我有一个使用seo URL的modx网站。工作起来很有魅力 现在我希望现有目录中的现有文件也能正确显示,但我收到的是默认的modx404页面 modx,网站本身位于webroot中,并使用以下.htaccess Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] RewriteRule .* - [
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
RewriteCond %{HTTP_HOST} ^foo\.com
RewriteRule ^(.*)$ http://www.foo.com/$1 [R=permanent,L]
# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets|update)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
更新目录是我现有文件所在的位置www.foo.com/update/index.html
在更新目录中,我使用以下内容:
RewriteEngine Off
<IfModule mod_security.c>
# Turn the filtering engine Off
SecFilterEngine Off
</IfModule>
AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /home/domains/foo.com/.htpasswd/public_html/update/.htpasswd
AuthName "login"
require valid-user
发动机关闭
#关闭过滤引擎
分离过滤器发动机关闭
AuthGroupFile/dev/null
AuthType Basic
AuthUserFile/home/domains/foo.com/.htpasswd/public\u html/update/.htpasswd
AuthName“登录”
需要有效用户
如您所见,此子目录也受密码保护。但我怀疑这与我的问题有关。事实上,我已经修补过了。。。但是到目前为止还没有成功。我想
RewriteRule ^(manager|assets|update)/*$ - [L]
应该是
RewriteRule ^(manager|assets|update)/.*$ - [L]
或者只是
RewriteRule ^(manager|assets|update)/ - [L]
在您的规则中,*
适用于/
,因此它匹配“零或多个正斜杠”