Yii:服务器问题控制器操作总是找不到404

时间:2014-05-12 07:19:42

标签: php yii lamp

我目前正在开发我的网站应用程序,我需要在实时服务器上进行测试。

在本地计算机上它运行良好但是在实时服务器上它不起作用。

这是我的问题描述:

When I access the domain root folder "mydomain.com" it is working. 
It displays the
webpage index. But when I try to access site/action it 
gives me 404 not found. Same thing happens for other controller action.

任何人都可以告诉我出了什么问题。我不是现场服务器的专家,所以我的术语不好我只能描述正在发生的事情。

我不确定这是否值得一提,但我使用的是yii urlManager

使用此设置

'urlManager'=>array(
            'urlFormat'=>'path',
            'rules'=>array(
                '<action:\w+>' => 'site/<action>',
                '<controller:\w+>/<id:\d+>'=>'<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
                '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
            ),
            'showScriptName'=>false
        ),

和根文件夹上的htaccess ..

服务器是:LAMP

非常感谢您的帮助..感谢所有人。

1 个答案:

答案 0 :(得分:5)

我有同样的问题,我的控制器名称是UserManagementController,它在Windows上运行得很好,但当我将它移动到Linux时,我收到了错误&#34;无法解决请求&#39; usermanagement&#39 ;。 &#34;

问题在于Linux区分大小写。我将控制器名称从UserManagementController更改为UsermanagementController,它可以工作。

相关问题