【问题标题】:Getting 500 internal server error while using .htaccess使用 .htaccess 时出现 500 内部服务器错误
【发布时间】:2015-05-02 05:31:12
【问题描述】:

打开时出现错误:

内部服务器错误 服务器遇到内部错误或配置错误,无法完成您的请求。 请联系服务器管理员 admin@****.** 并告知他们错误发生的时间以及您可能遇到的任何事情 这样做可能会导致错误。 服务器错误日志中可能会提供有关此错误的更多信息。

这是我的代码:

RewriteEngine On
RewriteRule  index.html   index.php
RewriteRule  history.html   historyp.php
RewriteRule  h-general.html   historyp.php?page=overall
RewriteRule  h-tajik.html   historyp.php?page=tajik
RewriteRule  h-woman.html   historyp.php?page=woman
RewriteRule  timeline.html   hronika.php
RewriteRule  t-tajik.html   tajikchron.php
RewriteRule  t-overall.html   overchron.php
RewriteRule  time.html   chronm.php
RewriteRule  heroes.html   heroesp.php

它在我的本地主机上工作,但是当我将它上传到服务器时,它会给出这样的错误。 谢谢

【问题讨论】:

    标签: apache .htaccess rewrite internal-server-error server-error


    【解决方案1】:

    如果您的 .htaccess 中有错误,则会发生这种情况,其中错误包括尝试使用 AllowOverride directive 不允许使用的命令,因此您可能缺少一个

    AllowOverride FileInfo
    

    在您的生产服务器配置中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-22
      • 2017-04-05
      • 1970-01-01
      • 2013-02-06
      • 2015-06-28
      • 2016-04-20
      相关资源
      最近更新 更多