Getting index.php in pretty URLs. How to fix this?

Permalink
I have enabled pretty urls and everything seems fine but the pages are still displaying index.php in the url when I try to access the pages without "www".

For instance, if I access my page withhttp://www.mysite.com/pets/, it's fine. But when I tryhttp://www.mysite.com/pets/, it comes up aswww.www.mysite.com/index.php/pets/.... Not sure if this is an issue with my .htaccess.

I have tried adding this line in /config/site.php but it's not having any effect: define("URL_REWRITING_ALL", true).

My .htaccess currently has this entry:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1


Is there a way to fix this in .htaccess or is it something to do with C5?

BlueFractals