【发布时间】:2015-06-28 05:05:53
【问题描述】:
我收到以下错误
Internal Server Error 服务器遇到内部错误或 配置错误,无法完成您的请求。
请联系服务器管理员 webmaster@localhost 和 告知他们错误发生的时间,以及您可能会做的任何事情 这样做可能会导致错误。有关此的更多信息 错误可能在服务器错误日志中可用。 Apache/2.2.22 (Ubuntu) 服务器位于 111.118.254.188 端口 80
我在这里运行 XAMPP 服务器是我的 htaccess 文件,我不明白问题是什么。
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</IfModule>
【问题讨论】:
-
您的 .htaccess 文件的文件权限是什么?
-
你的 Apache 日志在说什么?
-
@talsibony - 请注意
<IfModule mod_rewrite.c>部分。只是不运行 mod_rewrite 不会触发 500 状态码。 -
抛出 500 错误的原因有很多,甚至是您的 php 文件中的错误。第一步是检查您的错误日志。并尝试重命名您的 .htaccess 以确保它是导致错误的 .htaccess 文件。