如何解决尝试使用ErrorDocument处理symfony 5中的请求时遇到500 Internal Server Error错误
我在共享托管Cpanel中托管我的Symfony 5应用程序。当我使用.htaccess文件时,显示以下错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@famousmartbd.com to inform them of the time this error occurred,and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally,a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
.htaccess代码:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/public/index.php [L]
</IfModule><IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /public/index.php/
</IfModule>
</IfModule>
如何解决此错误。请帮助我。
解决方法
配置错误。尝试删除此<IfModule !mod_rewrite.c>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。