This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: 2 domains, 1 host
Author
Message |
zjieb
Newbie


Joined: 29 March 2011
Posts: 2
Posted: 29 March 2011 at 12:16pm

I own 2 domain names on the same (virtual) host. I can access files via my
master domain (i.e. domain1.nl).

I want visitors of domain2.nl (and www.domain2.nl) redirected to
www.domain1.nl/folder2

I tried:
Code:
RewriteEngine on
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(domain2\.nl)$ [NC]
RewriteRule (.*) folder2$1 [L]


Sadly this doesn't work. Anyone got an idea how to solve this (simple)
problem?
Back to Top
 
zjieb
Newbie


Joined: 29 March 2011
Posts: 2
Posted: 30 March 2011 at 4:59am

I tried and tried and I cannot get it to work...

maybe I can add more details to my situation:

1. www.domain1.nl
2. www.domain2.nl ---> www.domain1.nl/folder2

When i visit domain2.nl/test.asp it shows the file under domain1.nl/test.asp. I want to (silently) direct all visitors of www.domain2.nl to
www.domain1.nl/folder2. So when someone visits www.domain2.nl/test.asp the file www.domain1.nl/folder2/test.asp is shown.

Anyone?
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 30 March 2011 at 5:44am

Please try this:

RewriteEngine on
RewriteCond %{HTTP_HOST} domain2\.nl$ [NC]
RewriteRule (.*) http://www.domain1/folder2$1 [R]

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 

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

Printable version Printable version