I can't configure routing project in Yii is 3 days, all tried to help ... I have:
/var/www/ - project
/var/www/yii - yii framework
./htaccess
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is http://localhost/begin/, use /begin/
RewriteBase /
# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
index.php finds.
./var/www/protected/config/main.php
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'/'=>'/view',
'//'=>'/',
'/'=>'/',
),
),
When I enter for example 107.170.91.28/site/contact then displays an error 404. URL of server 107.170.91.28 On the local server. all works. If I enter this URL 107.170.91.28/index.php/site/contact or 107.170.91.28/index.php?r=site/contact - it works. Ask for help, because I tried all methods set.