使用.htaccess获取500内部服务器错误

时间:2014-08-14 08:36:31

标签: php .htaccess wamp

我是.htaccess的新手,我写了一个.htaccess文件,比如

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+) index.php?url=$1 [QSA, L]

现在我正在像localhost/my_project/

这样的浏览器中运行我的网址

它给我以下错误

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

我的wamp服务器启动rewrite module。还检查错误日志,最后一行是

HTTP/1.1" 500 535

1 个答案:

答案 0 :(得分:2)

空间太大了!

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

#Remove that space between QSA, and L
RewriteRule ^(.+) index.php?url=$1 [QSA,L]