2 domain names => www.firstdomain.com/query ?

Using a single web hosting account to host multiple sites

2 domain names => www.firstdomain.com/query ?

Postby Homncruse » Wed Jul 09, 2008 9:08 am

I know this has probably been asked several times before but I can't find anything which specifically solves this, even though I'm sure it's done all the time.

I want to redirect both of my domains (sharing the same document root) to the first, including anything trailing the domain name.

domainA.com => www.domainA.com
domainB.com => www.domainA.com
domainA.com/something => www.domainA.com/something
domainB.com/something => www.domainA.com/something
www.domainB.com => www.domainA.com

So in essence, my second domain is simply an alias for the first and I want to force www. I do not have access to the httpd.conf file.

Current httpd.conf (not working):
Code: Select all
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.domainA\.com$ [NC]
RewriteRule ^(.*) http://www.domainA\.com/$1 [R=301]
Posts: 4
Joined: Mon Nov 27, 2006 11:54 am

Postby Homncruse » Wed Jul 09, 2008 9:55 am

Nevermind. That actually seems to work just fine - it was a configuration issue with another app.
Posts: 4
Joined: Mon Nov 27, 2006 11:54 am

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 2 guests