从Apache 2.4迁移到Apache 2.2时出现mod_rewrite错误
我有一个存储在我的网站的.htaccess文件中的重写规则列表,重写URL http://example.com/cloud/something到http://example.com/cloud/index.php?page=something 。 当我在Apache 2.4.7服务器上时,这些规则是完美的,但是我现在正在使用Apache 2.2.22(不是我的select)工作,出于某种原因,这些规则不起作用。 htaccess文件: RewriteEngine On RewriteBase /cloud/ RewriteCond %{THE_REQUEST} \ /+cloud/(?:index\.php|)\?page=([^&]+)/(&|\ |$) RewriteRule ^ %1/ [L,R] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?page=$1 [L,QSA] 每当我试图访问一个页面,其明确的URL( index.php?page=something ),它正在工作,但试图简短的方式导致404 Page Not Found响应。 我检查了Apache的error.log文件,看到每当我尝试访问这些URL之一时,都会出现一个新的错误: [error] [client 10.0.0.90] Negotiation: discovered file(s) matching request: /var/www/cloud/settings (None could be negotiated) 可能是什么问题? 为什么它不工作?