Not having much success. Of course, I'm not very good at my htaccess stuff! What I'm trying to achieve is that any domain that encounters this htaccess file is stripped of any subdomin and put in to a www. format.
e.g. blog.domain.co.uk, forum.domain2.com and sub.domain3.com
would be turned in to:
www.domain.co.uk, www.domain2.com and www.domain3.com
as there are various domains virtually hosted and I use a script to manage them.
This is what I got from putting together what I've done elsewhere, but it doesn't work:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^((.+)\.|$) [NC]
RewriteRule ^ http:// www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
(Obviously without the break in the "http:// www", WW won't let me enter that as a solid piece!)
Like I said, the domain that calls this htaccess file will vary, but all subdomains need to be stripped and replaced with www.
Any ideas?
Thanks
Mike