zoukankan      html  css  js  c++  java
  • wampserver apache 500 Internal Server Error解决办法

    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.

    排查:

    1:打开apache的错误日志D:wamplogsapache_error.log,如果出现Invalid command 'RewriteEngine', 那说明apache没有开启rewrite模式

    解决:

    1:打开Apache安装目录下httpd.conf,搜索“LoadModule rewrite_modulemodules/mod_rewrite.so”,找到这一行,去掉前面的“#”;
    2:找到“AllowOverride None”改为“AllowOverride All” 有两个地方需要修改
    3:新建.haccess文件,放在当前网站根目录下,在.haccess文件中写伪静态规则,比如:

    <IfModule mod_rewrite.c>

    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

    </IfModule>

     4:重启apache

  • 相关阅读:
    SQL每日一题(20200512)
    SQL每日一题(20200506)
    SQL每日一题(20200509)
    sql每日一题(20200423)
    Oracle内存全面分析
    dbms_output.put与put_line
    oracle xml操作
    超级强大的破解极验滑动验证码--讲解非常详细
    python开发---目录
    Flask大全
  • 原文地址:https://www.cnblogs.com/afish/p/4378051.html
Copyright © 2011-2022 走看看