Cormac
New Member
Hi guys, i wish to add to the current .htaccess file that resides in my blog root so that if a user types in http://domain.com they're automatically redirected to http://www.domain.com.
I have opened up the current .htaccess file and I found the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
To enforce the www i added the following to the .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_Host} ^cormacmoylan.com/blog [NC]
RewriteRule ^(.*)$ http://www.cormacmoylan.com/blog/$1 [L,R=301]
But it doesn't enforce the rule. Does anyone know where i'm going wrong?
I have opened up the current .htaccess file and I found the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
To enforce the www i added the following to the .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_Host} ^cormacmoylan.com/blog [NC]
RewriteRule ^(.*)$ http://www.cormacmoylan.com/blog/$1 [L,R=301]
But it doesn't enforce the rule. Does anyone know where i'm going wrong?