Good day,
I’m trying to get index.php removed from the url but for some reason, not able to get it to work. I’ve already checked rewrite_module and set AllowOverride to All but still no go. I have followed instructions on this post(http://www.yiiframework.com/forum/index.php?/topic/7803-how-to-remove-index-php-from-url/) but still not working. Below is the .htaccess that i’m using as well as the configuration file for yii.
/** .htaccess **/
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
/** main.php **/
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias(‘local’,‘path/to/local-folder’);
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
‘basePath’=>dirname(FILE).DIRECTORY_SEPARATOR.’…’,
‘name’=>‘real tax property management system’,
// preloading ‘log’ component
‘preload’=>array(‘log’),
// autoloading model and component classes
‘import’=>array(
‘application.models.*’,
‘application.components.*’,
‘application.extensions.userLib.*’,
),
‘modules’=>array(
‘gii’=>array(
‘class’=>‘system.gii.GiiModule’,
‘password’=>‘pickupapasswordhere’,
),
),
‘defaultController’=>‘main’,
// application components
‘components’=>array(
‘user’=>array(
// enable cookie-based authentication
‘allowAutoLogin’=>true,
),
/*‘cache’=>array(
‘class’=>‘system.caching.CApcCache’,
),
‘db’=>array(
‘connectionString’ => ‘sqlite:protected/data/blog.db’,
‘tablePrefix’ => ‘tbl_’,
),*/
// uncomment the following to use a MySQL database
‘errorHandler’=>array(
// use ‘site/error’ action to display errors
‘errorAction’=>‘site/’,
),
‘urlManager’=>array(
‘urlFormat’ => ‘path’,
‘showScriptName’ => false,
‘rules’ => array(
),
),
‘log’=>array(
‘class’=>‘CLogRouter’,
‘routes’=>array(
array(
‘class’=>‘CFileLogRoute’,
‘levels’=>‘error, warning’,
),
// uncomment the following to show log messages on web pages
/*
array(
‘class’=>‘CWebLogRoute’,
),
*/
),
),
)
);