i’ve been stuck on this for a few weeks, i think i’m close now, but i’m stuck on syntax for htcaccess..
here’s what i’m trying to do: user types in site.com and is redirected to subdomain.wordpresshost.com; however the address bar still says site.com (i also want to keep anything after this point such as/blog.html etc)
nameserver is all set, now i’m just rewriting urls… heres the best code i have come up with.. it’s just not working
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.wordpresshost.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^site.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.site.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [L,R=301]
This code successfully changes subdomain.wordpresshost.com to site.com; however, it returns an error stating either ‘server unavailable’ or ‘too many redirects’
I think i’ve hit my head against the keyboard so that I’m just making static noise, so i’d appreciate any help!
The last
RewriteCondis unnecessary and is creating the redirection loop –www.site.comis rewritten towww.site.com… maybe you meant the non-www. Either way, it needs to be removed.