I am working with Yii Framework on Apache/2.2.15 (CentOS) Server.
Following line is uncommented in /etc/httpd/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
I can see mod_rewrite under Loaded Module when I do following
<?php phpinfo(); ?>
Yii Project Structure:
/var/www/test/
/var/www/test/index.php
/var/www/test/.htaccess
.htaccess content
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
It works fine when I do:
http://10.20.30.40/test/index.php/testcontroller/testaction
But when I do:
http://10.20.30.40/test/testcontroller/testaction
It shows following error:
Not Found
The requested URL /var/www/test/index.php was not found on this server.
Any idea?