Problem in deployment


I’m deploying a new yii app on a production server, the server has been recently configured to host the app and all yii requirements hav been installed successfully (ran yii/requirements). The problem is that none of the controller/action, in the entire site are working but site/default/index. I’m accessing through the server IP, so when I write like this, the main page (site(default/index) is showed, but when I click on any link, or write another route, then not found error is generated, e.g.

The site is working properly in my development pc, don’t know if this is a yii config I’m missing or a server problem.

Hi!!, has anyone had this problem before?, I’m really stuck here…

Seems like you’re using the path url format. Is the AllowOverride [font=“Arial”]directiva properly set in apache[/font]? [font=“Arial”]Also, did you copy the .htaccess file?[/font]

Thanks for your answer,

Yes I’m using path url format, this is how I configured it:

'urlManager' => array(

            'urlFormat' => 'path',

            'rules' => array(

                '<controller:\w+>/<id:\d+>' => '<controller>/view',

                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',

                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',


            'showScriptName' => false,


How should I configure AllowOverride in Apache, because in my local machine I did’nt do nothing.

This is how I have .httaccess file in webroot directory

# change de default charset to utf8

AddDefaultCharset utf-8

Options +FollowSymLinks

IndexIgnore */*

RewriteEngine on

# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php

RewriteRule . index.php

Thanks in advance.

You have to set

AllowOverride all

either in your virtualhost configuration or your httpd.conf if you’re not using virtualhosts.

Here’s a few documentation:

That’s was the problem, dude you save my day… Gracias wn!!! :D

hahaha de nada (you’re welcome :P)