When I wanted the www to be prepended when any page on one of my sites was accessed I found this or a near cousin of it on various site:
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.somedomain\.com
RewriteRule (.*) http://www.somedomain.com/$1 [R=301,L]
I added it to my .htaccess but it didn’t work.
I have various funny things going on there so later I moved it up to be the first thing after
Options +FollowSymlinks
RewriteEngine on
And it works fine.
Always some niggling little detail.
Related posts:
Related posts brought to you by Yet Another Related Posts Plugin.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment