我是.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
答案 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]