我的htaccess文件中有以下代码:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^forums/ - [L,NC]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
------------------------------------------------
我的.htaccess目录就像这样:
..wamp/www/.htaccess
我的网站目录就像这样
..wamp/www/Careers
当我加载我的职业文件夹或本地主机时,它会出错:
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.
答案 0 :(得分:0)
如果您在自己的网站上使用.htaccess,则可能会干扰您尝试加载到浏览器中的网页。请仔细检查.htaccess配置。任何语法错误都将导致显示500内部服务器错误消息,而不是您的网站。
要确认错误配置.htaccess是否是导致500内部服务器错误的原因,请暂时删除或重命名.htaccess文件,然后尝试重新加载页面。
您可以在线查看htaccess tester