i currently have this in my htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|themes|admin|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
this basically strips out the index.php
now i need to redirect all non www to www url so i tried adding this
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(/)?(.*) http://www.mysite.com/$1 [R=301,L]
it works fine except that the index.php is added after the url whenever a non www url is typed.
ex:
mysite.com = http://www.mysite.com
mysite.com/about = http://www.mysite.com/index.php/about
i want to remove that “index.php”. any ideas?
