繁体   English   中英

index.php不会加载laravel和wamp

[英]index.php don't load with laravel and wamp

我是新手。 所以我有一个laravel应用程序的问题。 当我尝试打开www.test.com/或www.test.com/index.php时,我可以访问任何URL,如www.test.com/something,但浏览器会返回“此网页不可用ERR_CONNECTION_RESET”

我正在使用Wamp Server 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注释中。 通过替换普通的HTML注释解决

您需要告诉计算机test.com域托管在服务器上,您可以通过将其添加到主机文件中来实现。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM