【发布时间】:2015-11-20 14:38:54
【问题描述】:
我是新手。所以我遇到了一个 laravel 应用程序的问题。我可以访问任何网址,例如 www.test.com/something 但浏览器返回“此网页不可用 当我尝试打开 www.test.com/ 或 www.test.com/index.php 时,ERR_CONNECTION_RESET”
我正在使用 Wamp 服务器 2.5
httpd-vhosts.conf 文件
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/test/public"
ServerName test.com
</VirtualHost>
.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
在 routes.php 中有这一行
Route::get('/', 'PagesController@index');
LoadModule rewrite_module modules/mod_rewrite.so 未注释。 当我插入类似
echo "test"; exit;
在 index.php 的最开始,它工作正常并出现消息。 诀窍是另一个具有相同设置的项目可以正常工作。 有什么想法吗?
编辑:问题出在像 {{-- smthg --}} 这样的 BLADE cmets 中。通过在普通html cmets上替换解决
【问题讨论】:
标签: php apache .htaccess laravel wamp