我尝试在 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 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>