【问题标题】:index.php don't load with laravel and wampindex.php 不加载 laravel 和 wamp
【发布时间】: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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2014-03-25
      • 2016-10-09
      • 2011-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-13
      相关资源
      最近更新 更多