在apache\conf\httpd.conf设置
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>
然后再htdocs文件夹里面创建一个.htaccess的文件,就出现错误
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500把.htaccess文件删除了,就恢复正常,请问为什么这样?

解决方案 »

  1.   

    .htaccess文件必须用ansii编码,utf8编码100%出500错误,上次被这个问题折磨了6个小时
      

  2.   

    windows apache URL重写的配置方法:
     
        第一步:找到apache的配置文件httpd.conf(文件在conf目录下) 
      第二步:你首先必须得让服务器支持mod_rewrite,如果你使用的是虚拟主机,请事先询问你的主机提供商。  打开httpd.conf,找到  #LoadModule rewrite_module modules/mod_rewrite.so  把#去掉  找到AllowOverride None 改成 AllowOverride All,  注:AllowOverride 的参数设置为ALL,表示整台服务器上都支持URL规则重写。Apache 服务器要读每个网站下目录下的 .htaccess 文件。如果没有这个文件,或者这个文档没有定义任何关于URL重写的规则就不会有任何效果。  对于不同的网址,需要在APACHE中增加如下内容  <Directory “E:/Apache Group/Apache2/htdocs/leapsoul”>  /*引号里代表你的web存放目录*/  /*如果是Linux,只要你定位到你网站目录即可*/
       Options FollowSymLinks
       AllowOverride None  </Directory>  第三步:重启apache服务器,先按stop再start。  第四步:在你需要URL重写的网站目录下放一个.htaccess文件,文件名是.htaccess,Windiws下不能直接建立,你可以用记事本另存为。
      

  3.   

     找到AllowOverride None 改成 AllowOverride All这一步一定要做