Hi, I am using the following to redirect domain.com to www.domain.com but i want to add in so that if someone goes to /index.php they also are redirected to www.domain.com RewriteRule ^ - [E=via:http] RewriteCond %{HTTPS} =on RewriteRule ^ - [E=via:https] RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) %{ENV:via}://www.%{HTTP_HOST}/$1 [L,R=301] Code (markup): Cheers, Adam
Here it to redirect non-www to www. RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L] To remove index.php try, RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] Should work, but test it first, I didn't.