.htaccess Laravel:500 Internal Server Error for all routes other than“/”[已关闭]

u3r8eeie  于 6个月前  发布在  其他
关注(0)|答案(1)|浏览(52)

**已关闭。**此问题需要debugging details。目前不接受回答。

编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将帮助其他人回答问题。
5天前关闭。
Improve this question
这有点奇怪,但它正在发生。我在这里找到了解决方案
解决方案在.htaccess文件中,而不是在php中。它需要在.htaccess文件中更改行

RewriteRule ^ index.php [L]

字符串

RewriteRule ^(.+)$ /index.php [L]


同样的情况在一台服务器上工作正常,但在另一台服务器上却不行。
我想了解这种行为。为什么会这样?

ycl3bljg

ycl3bljg1#

我知道这是9岁的帖子,但它是谷歌搜索这个问题的顶部附近.有一个不同的解决方案后使用这个'RewriteEngine开':

RewriteBase /

字符串
然而,我在同一台服务器上有多个laravel项目(例如在Linux中)。所以我的解决方案是使用这个:

RewriteBase /sitename/

相关问题