我一定在Apache中發現了一個bug!因爲我的虛擬主機有最棘手的問題。我無法訪問名爲admin的文件夾。它在一個虛擬主機中工作,但不在另一箇中。 (同託管帳戶)mod_rewrite由於mod_auth不工作?
/.htaccess
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase/
# No logic for resolved paths
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule^- [L]
RewriteRule .* index.php [L]
</IfModule>
/admin/.htaccess:
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /home/user/domains/mydomain.com/public_html/admin/.htpasswd
Require valid-user
解決http://www.mydomain.com/admin/index.php我收到404未找到。如果我刪除了admin/.htaccess文件,則頁面解析。那是怎麼回事?
可能欺騙http://stackoverflow.com/questions/3144401/htaccess-mod-rewrite-conflicting-with-subfolder-auth – tim