This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Helicon Ape
 Helicon Tech : Helicon Ape
Subject Topic: How to redirect domainalias to folder Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 04 July 2011 at 3:18am | IP Logged Quote Sa1k0

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 View Sa1k0's Profile Search for other posts by Sa1k0
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 04 July 2011 at 7:24am | IP Logged Quote Vyacheslav

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 View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 04 July 2011 at 8:17am | IP Logged Quote Sa1k0

I already tested this. the Ape is working.
I put the rule in.
Back to Top View Sa1k0's Profile Search for other posts by Sa1k0
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 04 July 2011 at 9:45am | IP Logged Quote Vyacheslav

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

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 04 July 2011 at 11:39am | IP Logged Quote Sa1k0

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 View Sa1k0's Profile Search for other posts by Sa1k0
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 05 July 2011 at 4:13am | IP Logged Quote Vyacheslav

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 View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 07 July 2011 at 6:20am | IP Logged Quote Sa1k0

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 View Sa1k0's Profile Search for other posts by Sa1k0
 
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 08 July 2011 at 4:02am | IP Logged Quote Sa1k0

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 View Sa1k0's Profile Search for other posts by Sa1k0
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 08 July 2011 at 5:08am | IP Logged Quote Vyacheslav

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

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 19
Posted: 08 July 2011 at 6:20am | IP Logged Quote Sa1k0

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 View Sa1k0's Profile Search for other posts by Sa1k0
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum