【问题标题】:Laravel 4 Hybridauth Server not found未找到 Laravel 4 Hybridauth 服务器
【发布时间】:2014-07-22 22:15:18
【问题描述】:

我已将 hybridauth 包安装到我的 laravel 4.2.* 设置中。我正在运行 MAMP。

我正在使用此示例中的 app/config/hybridauth.php 和 app/routes.php 的代码:

https://github.com/vohof/laravel-hybridauth

当我在 Mozilla 中打开 URL http://localhost/auth/facebook/ 时,这会导致 Mozilla Firefox 中出现“未找到服务器”页面,并且 URL 从 http://localhost/auth/facebook 更改为 http://www.localhost.com/auth/facebook

在 Safari 中没有 url-redirect,但会显示一个白页。这些问题只出现在 Laravel 4.2.* 上,但不会出现在 Laravel 4.0.0 上。在 Laravel 4.0.0 中,我可以正确重定向到 twitter 页面。

有谁知道这是为什么以及这个问题来自哪里?

任何帮助表示赞赏, 罗马

【问题讨论】:

    标签: php .htaccess laravel mamp hybridauth


    【解决方案1】:

    尝试将此添加到公共目录中的 .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>
    

    【讨论】:

      猜你喜欢
      • 2013-10-16
      • 2013-10-20
      • 2023-04-01
      • 2020-05-19
      • 2016-01-02
      • 1970-01-01
      • 2013-08-14
      • 2015-10-31
      • 2018-11-10
      相关资源
      最近更新 更多