laravel url ../public/login不工作,但../public/index.php/login无需启动工作

时间:2015-02-03 03:05:27

标签: twitter-bootstrap laravel indexing public

我正在使用laravel来制作我的网站。 在我的子域上传我的网络文件后:rivelapark.com/au 我无法访问rivelapark.com/au/public/login (*在我的本地服务器中,localhost / au / public / login确实有效)

但是,当我访问rivelapark.com/au/public/index.php/login时,它可以工作,但我的引导程序无效。

这是我的应用> config> database.php:

'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'rivelapark.com',
            'database'  => '******',
            'username'  => '********',
            'password'  => '*******',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),

这是我的公开> .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>

有人可以提供帮助吗?谢谢你们

2 个答案:

答案 0 :(得分:0)

http://laravel.com/docs/4.2/installation#pretty-urls

  

如果您使用Apache为Laravel应用程序提供服务,请务必启用mod_rewrite模块。   如果Laravel附带的.htaccess文件不能与您的Apache安装一起使用,请尝试以下方法:

    Options +FollowSymLinks
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

您是否尝试使用此示例? mod_rewrite模块是否已启用?

答案 1 :(得分:0)

实际上主要的问题是浏览器的缓存尚未刷新。等了15分钟后,现在可以了!