【发布时间】:2012-12-18 23:44:09
【问题描述】:
我有一个 htaccess 文件,它将所有请求重定向到 /public/index.php。
AuthType Basic
AuthName "Access to /testsite"
AuthUserFile /kunden/homepages/28/d446685396/htpasswd
Require user oglover
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . public/index.php [L]
它适用于所有请求,例如www.mywebsite.com/aboutus、www.mywebsite.com/contact、www.mywebsite.com/news 等......但如果我访问 www.mywebsite.com/,我会收到 403 禁止错误。一切都很好,直到我搬到一个新的网络主机上,我不知道如何解决这个问题。
【问题讨论】:
标签: .htaccess mod-rewrite url-rewriting