This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: How to redirect domainalias to folder
Author
Message |
Sa1k0
Newbie


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 04 July 2011 at 3:18am

Hi Guys,

I'm trying to redirect my domainaliasses to specific folders but i cant get it to work. I use the following rules.

Domainalias: paypaul.nl
folder: paypaul

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} (?:www\.)?paypaul.\nl [NC]
RewriteRule ^(?!folder)(.*)$ /paypaul/$1 [NC,L]

Can someone help we? Thank You
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 04 July 2011 at 7:24am

Hello.
Could you please provide several examples of non-working URLs.
Please also check if Helicon Ape works at all:
Code:
RewriteRule .? - [G]


You should see “410 Gone” message on every request.

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


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 04 July 2011 at 8:17am

I already tested this. the Ape is working.
I put the rule in.
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 04 July 2011 at 9:45am

So what does not actually work? Please share a few examples.
Thank you.

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


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 04 July 2011 at 11:39am

Slavik,

I have one primary domain. with multiple aliasses.

I want to redirect all aliasses to specific folders within the primary domain.

For example.

domain alias: paypaul.nl has to go to the folder /paypaul
domain alias: technoguide.nl has to go to the folder /technoguide


Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 05 July 2011 at 4:13am

Hello.
You may use map-files.
Please see the following example:

Code:
RewriteEngine on
RewriteBase /

RewriteMap map txt:my-map.txt [NC]

RewriteCond %{HTTP_HOST} (.*)
RewriteCond ${map:%1|NOT_FOUND} (.*)
RewriteCond %2 !NOT_FOUND
RewriteRule .? %2 [R=301,L]


And the my-map could be:
Code:
paypaul.nl /paypaul
technoguide.nl /technoguide


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


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 07 July 2011 at 6:20am

Slavik,

This also does not work.

In my root directory i put the file my-map.txt with the domains in. but it does not redirect.

Back to Top
 
Sa1k0
Newbie


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 08 July 2011 at 4:02am

This rule i tried works but in the address bar i just want to see the domainname.

RewriteCond %{HTTP_HOST} alias1\.nl$ [NC]
RewriteRule (.*) http://www.domain.nl/alias1$1 [R]

So when i type in www.alias1.nl in the adress bar it has to stay there and not change to www.domain.nl/alias1


Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 08 July 2011 at 5:08am

Hello.
If domains use different application pools, please replace RewriteRule directive with RewriteProxy.
Thank you.

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


Joined: 02 July 2009
Location: Netherlands
Posts: 19
Posted: 08 July 2011 at 6:20am

I got it to work with the following rules.

Options SymlinksIfOwnerMatch

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?paypaul.nl$
RewriteRule ^(.*)$ http://www.paulvandrunen.com/paypaul/$1


Back to Top
 

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

Printable version Printable version