Domain Alias case....http://child.com=>http://child.mum.c

Using a single web hosting account to host multiple sites

Domain Alias case....http://child.com=>http://child.mum.c

Postby alienbb » Wed Jan 09, 2008 7:13 pm

Is that possible to forward a domain to another domain on different hosting but same server with .htaccess ?

The .htaccess currently using for domain http://child.com
Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^child.mum.com$ [NC]
RewriteRule ^(.*)$ http://child.mum.com/$1 [L,R=301]

The bad thing is the address on browser would redirect to http://child.mum.com

Is that possible to alias a domain & url in .htaccess without changing the addresses showing on browser.

http://child.com => http://child.mum.com
http://child.com/files => http://child.mum.com/files

Hopefully i can get the solution here
alienbb
 
Posts: 1
Joined: Wed Jan 09, 2008 6:41 pm

Postby richardk » Thu Jan 10, 2008 1:38 pm

If mod_proxy is available you can use
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^(.*)$ http://child.mum.com/$1 [P,L]

but it's not a particularly good way of doing it, you should probably ask your host if they can set it up a better way (possibly setting it as an add-on domain or using a Symbolic Link).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 20 guests

cron