laravel url ../public/login不能正常工作,但是../public/index.php/login无需启动工作 [英] laravel url ../public/login not working but ../public/index.php/login works without bootstrap

查看:305
本文介绍了laravel url ../public/login不能正常工作,但是../public/index.php/login无需启动工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)

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

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

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

Here is my app>config>database.php:

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

这是我的公开> .htaccess:

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

推荐答案

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


如果使用Apache为Laravel应用程序提供服务,请确保启用mod_rewrite模块。
如果Laravel附带的.htaccess文件不能与你的Apache安装一起使用,请试试这个:

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]

您是否尝试使用此示例?

mod_rewrite模块是否已启用?

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

这篇关于laravel url ../public/login不能正常工作,但是../public/index.php/login无需启动工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆