我正面临关于我的.htaccess文件的问题,这里是文件中的代码
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^category/([^/\.]+)/?$ index.php?category=$1 [L]
RewriteRule ^department/([^/\.]+)/?$ index.php?department=$1 [L]
RewriteRule ^brand/([^/\.]+)/?$ index.php?brand=$1 [L]
RewriteRule ^product/([^/\.]+)/?$ index.php?product=$1 [L]
RewriteRule ^basket/([^/\.]+)/?$ index.php?basket=$1 [L]
</IfModule>
一旦我加载网站就会给我这个错误
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@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.
一旦我删除.htaccess文件内容,网站就恢复正常工作
答案 0 :(得分:3)
那些“内部服务器错误”消息令人痛苦;它们几乎没有任何错误信息一样无用。
.htaccess文件的调试过程:
答案 1 :(得分:0)
确保您使用正确的编码保存了.htaccess文件:我建议ANSI作为apache可能会有问题,如果不是。
答案 2 :(得分:0)
请检查此目录是否配置为AllowOverride
设置为选项或全部