I have this already developed project on Yii and the problem is that the modules are not accessible via URLs. So, I went to my /config/main.php to see the URL manager code. it is like:
'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>',
),
'caseSensitive'=>false,
),
EDIT: Added 'caseSensitive'=>false,
and the modules section is like
'modules'=>array(
'api_v1',
'api_s1',
),
Inside modules I have folders for both and they again have controllers folder. The controller under controllers folder is ServerController.php with action functions like actionList
but when I go to access this module I type in the browser as:
http://domain-name/api_s1/server/List
but it is showing 404 error. I am not sure what else is required. Any help will be highly appreciated.
EDITED:
I have a .htaccess file in every main folder as in protected, framework and in the main folder also. All .htaccess files have only one line as
deny form all
but the main .htaccess file which is on the root has this
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
ErrorDocument 404 /notfound.html