我已经在我的laravel 4.2中安装了hybridauth包。*设置。我正在运行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重定向,但显示一个白页面。这些问题只出现在Laravel 4.2中。*但不适用于Laravel 4.0.0。在Laravel 4.0.0中,我得到了正确的重定向到twitter页面。
有没有人知道为什么会这样,这个问题是从哪里来的?
感谢任何帮助,罗马
尝试将此添加到公共目录
中的.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>