This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Forward multiple domains to one domain
Author
Message |
juno
Newbie


Joined: 29 September 2009
Posts: 25
Posted: 12 July 2010 at 7:32am

Hi,

We own a site with 4 domains (mysite1.com - mysite4.com)
On this site there is a page with googlemaps, for example: www.mysite.com/projects/googlemaps.aspx

Because googlemaps can only use one key for one site, googlemaps will not work on the other three domains that will look like this:
www.mysite1.com/projects/googlemaps.aspx

Is it possible to redirect the 3 domains to the first one?
So that ALL pages on mysite2.com, mysite3.com and mysite4.com point to mysite1.com?

This way we won't have the limitation of googlemaps anymore.
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 12 July 2010 at 9:36am

Hello,
To point all the pages you may try something like this:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(mysite2\.com|mysite3\.com|mysite4\.com)$ [NC]
RewriteProxy (.*) http://mysite1.com/$1 [L]


But maybe it would be enough to handle the googlemaps.aspx page only:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(mysite2\.com|mysite3\.com|mysite4\.com)$ [NC]
RewriteProxy ^(projects/googlemaps\.aspx)$ http://mysite1.com/$1 [L]


__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
juno
Newbie


Joined: 29 September 2009
Posts: 25
Posted: 12 July 2010 at 9:51am

Thanks for the reply.

Unfortunately it isn't working yet.

Error when i try to access www.mysite2.com/projects/:

(8) mod_core_context: ConfigFactory.LoadHtaccess: e:\docroot\www.mysite1.com\.htaccess
(8) proxy: request to http://www.mysite1.com/projects/
(4) proxy: Done with error: NameResolutionFailure: The remote name could not be resolved: 'www.mysite1.com'

Obviously i've replaced mysite1.com etc. with our domains.


Back to Top
 
techchif2
Newbie


Joined: 09 March 2008
Posts: 23
Posted: 12 July 2010 at 11:19am

for redirect you can use RewriteRule instead of RewriteProxy

RewriteEngine on
RewriteBase
RewriteCond %{HTTP_HOST} ^(mysite2\.com|mysite3\.com|mysite4\.com)$ [NC]
RewriteRule ^(/projects/googlemaps\.aspx)$ http://mysite1.com$1 [L,NC,R=301]

Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 13 July 2010 at 4:55am

Hello,
Please make sure the remote name is accessible from the server and please send me your actual rules to [email protected]
Thanks.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
juno
Newbie


Joined: 29 September 2009
Posts: 25
Posted: 13 July 2010 at 5:05am

Hi,

techchif2 is right.
I've changed RewriteProxy into RewriteRule and now it's working.

Thank you all! :D
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version