【发布时间】:2015-11-23 16:41:11
【问题描述】:
我已将我的 laravel 项目从我的电脑复制到笔记本电脑。在我的笔记本电脑上,我使用 xampp (mac)。但是当我使用 php artisan migrate 设置我的服务器等时,我看不到我的主页,它只是说“服务器错误”。
当我查看我的 Apache 日志文件时,它告诉我:
请求超出了 10 次内部重定向的限制,因为可能 配置错误。使用“LimitInternalRecursion”来增加 必要时限制。使用“LogLevel debug”获取回溯。
我想我必须更改 .htacces 文件中的某些内容?请参阅附件图片了解我的文件夹结构。
编辑:
.htaccess 文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
【问题讨论】:
-
我们需要更多信息。你的 apache 配置,你的 htaccess 文件,laravel app.config,任何虚拟主机配置
-
这是在windows中设置xampp vhost,尝试按照它在mac中的过程是相同的,它还显示了如何为laravel设置vhoststackoverflow.com/questions/27754367/…