I've added the piece of code below to re-direct non-www URL's to www URL's.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$
http://www.%{HTTP_HOST}/$1 [R=301,L]
The homepage is re-directing fine but the pages are not. When I enter domain.com/page it re-directs to WWW.domain.com/INDEX.PHP/page
For some reason it's adding index.php in the URL's only when the pages are re-directed to the www. version.
Thanks in advance for any help on this problem.
Comments
Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On # for www redirect RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteBase / <Files .*> Order Deny,Allow Deny From All </Files> # Allow asset folders through RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L] # Protect application and system files from being viewed RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [L] # Prevents access to dot files (.git, .htaccess) - security. RewriteCond %{SCRIPT_FILENAME} -d RewriteCond %{SCRIPT_FILENAME} -f RewriteRule "(^|/)\." - [F] </IfModule> Options -Indexes