laravel url ../public/login not working but ../public/index.php/login works without bootstrap

扶醉桌前 提交于 2019-12-12 06:06:25

问题


i'm using laravel to make my website. after i upload my web files on my sub-domain : rivelapark.com/au i can't access rivelapark.com/au/public/login (*in my local server, localhost/au/public/login did works)

But, when i access rivelapark.com/au/public/index.php/login it works but my bootstrap is not working.

Here is my app>config>database.php:

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

and this is my public>.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>

Is there anyone could help ? Thank You Guys


回答1:


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

If you use Apache to serve your Laravel application, be sure to enable the mod_rewrite module. If the .htaccess file that ships with Laravel does not work with your Apache installation, try this one:

    Options +FollowSymLinks
    RewriteEngine On

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

Did you try to use this example?
mod_rewrite module is enabled?




回答2:


Actually the main problem is the cache of the browser not yet refreshed. After waiting 15 minutes, now it works !



来源:https://stackoverflow.com/questions/28290673/laravel-url-public-login-not-working-but-public-index-php-login-works-with

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!