Php 500内部服务器错误:.htaccess
我得到以下错误 内部服务器错误服务器遇到内部错误或 配置错误,无法完成您的请求 请与服务器管理员联系,webmaster@localhost及 通知他们错误发生的时间,以及您可能需要的任何信息 这样做可能会导致错误。更多信息 服务器错误日志中可能有错误信息。Apache/2.2.22(Ubuntu) 位于111.118.254.188端口80的服务器 我正在运行一个XAMPP服务器,这是我的htaccess文件,我不明白问题出在哪里Php 500内部服务器错误:.htaccess,php,apache,.htaccess,Php,Apache,.htaccess,我得到以下错误 内部服务器错误服务器遇到内部错误或 配置错误,无法完成您的请求 请与服务器管理员联系,webmaster@localhost及 通知他们错误发生的时间,以及您可能需要的任何信息 这样做可能会导致错误。更多信息 服务器错误日志中可能有错误信息。Apache/2.2.22(Ubuntu) 位于111.118.254.188端口80的服务器 我正在运行一个XAMPP服务器,这是我的htaccess文件,我不明白问题出在哪里 # Customized error messages. Er
# 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>
#自定义错误消息。
ErrorDocument 404/index.php
#设置默认处理程序。
DirectoryIndex.php
#各种重写规则。
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L,QSA]
您应该添加RewriteBase来定义每个目录前缀
还可以尝试添加:
Options +FollowSymLinks
你的.htaccess文件的文件权限是什么?你的Apache日志说什么?@talsibony-请注意
部分。只是不运行mod_rewrite不应该触发500状态代码。有很多原因可以引发500错误,甚至是php文件中的错误。第一步是检查错误日志。并尝试重命名.htaccess,以确保是.htaccess文件导致了错误。。