【发布时间】:2013-12-26 11:13:06
【问题描述】:
我正在使用 apache 2.2.25 运行 cpanel,并具有以下站点自定义配置设置
WSGIScriptAlias /trac /usr/share/trac/cgi-bin/trac.wsgi
<Directory /usr/share/trac>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
<Location "/trac/login">
AuthType Basic
AuthName "Trac"
AuthUserFile /home/[user]/public_svn/conf/htpasswd
Require valid-user
</Location>
我尝试了以下.htaccess 配置和其他配置,但是当我转到www.mydomain.com/trac/login 时没有显示身份验证提示,而是重定向到index.php。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^svn - [L,NC]
RewriteRule ^trac - [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
有没有办法创建 .htaccess 重写条件以跳过身份验证请求?
【问题讨论】:
标签: php apache .htaccess mod-rewrite trac