Forgive me for such a frequent situation, I searched the Internet. I tried it, I didn’t have anything goes. I can’t configure routing in Yii. I would be grateful if anybody can help a beginner:
-
I have a finished project to Yii.
-
I have the cloud to digitalocean, installed the LAMP, in the/var/www/html uploaded project.
-
My /var/www/html/.htaccess
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
- /var/www/protected/config/main.php
// uncomment the following to enable URLs in path-format
'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>',
),
//not show index.php
'showScriptName' => false,
),
- /var/www/html/protected/.htaccess
deny from all
- Yii framework in /var/www/yii.
If you enter the URL of the project via a browser, enter /var/www/html/, /var/www/yii/does not see, is this normal? Tell me how to configure the correct routing? (without "/?r="). Folders 777, Files 666 rewrite_module (shared)