htaccess - internet server error 500 on XAMPP [closed]

允我心安 提交于 2021-02-19 04:59:04

问题


I am trying to run script on XAMPP but get "internet server error 500". Its fine when running on the live server. I assume this is a .htaccess error. The htaccess code is below:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    public/    [L]
    RewriteRule    (.*) public/$1    [L]
 </IfModule>

I have enabled htaccess by uncommenting the line:

LoadModule rewrite_module modules/mod_rewrite.so

in the config file.

Any ideas?


回答1:


Try editing this part in your httpd.conf and set AllowOverride All

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

Or try this:

<Directory />
     AllowOverride All
</Directory>


来源:https://stackoverflow.com/questions/9701610/htaccess-internet-server-error-500-on-xampp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!