Spending hours on trying to gett rid of the index.php in the url. Working on windows maching with XAMPP 1.8.0. and having no luck. Any help would greatly be appreciated. I the url looks good now but I just get a 404 error. I comment out the 'showScriptName'=>false, line in the urlManager config array and the 404 error goes away but the url is messing again.
I Checked the httpd.conf file to make sure overrides would be taken from the .htaccess file in the web root.
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
I wrote and saved the htaccess file in the web root where the index.php is, you can see I've tried a few different things.
#Options +FollowSymLinks
RewriteEngine on
#RewriteBase /
# if a directory or a file exists, use it directly
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php)
# otherwise forward it to index.php
#RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]
RewriteRule ^(.+)$ index.php?$1 [PT,L,QSA]
I went in and modified the urlManager array in the main.php config file
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'contact' => array('site/contact', 'caseSensitive'=>false),
'login' => array('site/login', 'caseSensitive'=>false),
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),