htaccess - XAMPP 上的互联网服务器错误 500 [已关闭]

2024-05-10

我尝试在 XAMPP 上运行脚本,但收到“互联网服务器错误 500”。在实时服务器上运行时效果很好。我认为这是一个 .htaccess 错误。 htaccess代码如下:

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

我通过取消注释该行来启用 htaccess:

LoadModule rewrite_module 模块/mod_rewrite.so

在配置文件中。

有任何想法吗?


尝试在您的httpd.conf并设置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

或者试试这个:

<Directory />
     AllowOverride All
</Directory>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

htaccess - XAMPP 上的互联网服务器错误 500 [已关闭] 的相关文章

随机推荐