0
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA, L]
我用这个.htaccess
文件,当我访问http://localhost/sites/MVC/help
它不返回index.php
但给:服务器错误!错误500当使用.htaccess文件
服务器错误!
服务器遇到内部错误,无法完成 您的请求。服务器超载或者在CGI脚本中出现错误 。
如果您认为这是服务器错误,请与网站管理员联系。
错误500
本地主机的Apache/2.4.10(Win32的)的OpenSSL/1.0.1i PHP/5.5.19
检查你的错误日志 – 2015-02-06 20:04:21
你的问题是rewrite_module可能没有加载。您应该检查您的Apache错误日志以查看问题的确切原因。将它们放在这些标记的内部:'/*您将重写规则转到此处*/ 'http://httpd.apache.org/docs/current/mod/core.html#ifmodule –
MonkeyZeus
2015-02-06 20:05:46
通常由AllowOverride设置为None而不是全部 – geggleto 2015-02-06 20:32:54