| Author |
|
Sa1k0 Newbie

Joined: 02 July 2009 Location: Netherlands
Online Status: Offline Posts: 19
|
| Posted: 04 July 2011 at 3:18am | IP Logged
|
|
|
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
Online Status: Offline Posts: 1542
|
| Posted: 04 July 2011 at 7:24am | IP Logged
|
|
|
Hello.
Could you please provide several examples of non-working URLs.
Please also check if Helicon Ape works at all:
You should see “410 Gone” message on every request.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
Sa1k0 Newbie

Joined: 02 July 2009 Location: Netherlands
Online Status: Offline Posts: 19
|
| Posted: 04 July 2011 at 8:17am | IP Logged
|
|
|
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
Online Status: Offline Posts: 1542
|
| Posted: 04 July 2011 at 9:45am | IP Logged
|
|
|
So what does not actually work? Please share a few examples.
Thank you.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
Sa1k0 Newbie

Joined: 02 July 2009 Location: Netherlands
Online Status: Offline Posts: 19
|
| Posted: 04 July 2011 at 11:39am | IP Logged
|
|
|
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
Online Status: Offline Posts: 1542
|
| Posted: 05 July 2011 at 4:13am | IP Logged
|
|
|
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 |
|
| |
Sa1k0 Newbie

Joined: 02 July 2009 Location: Netherlands
Online Status: Offline Posts: 19
|
| Posted: 07 July 2011 at 6:20am | IP Logged
|
|
|
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
Online Status: Offline Posts: 19
|
| Posted: 08 July 2011 at 4:02am | IP Logged
|
|
|
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
Online Status: Offline Posts: 1542
|
| Posted: 08 July 2011 at 5:08am | IP Logged
|
|
|
Hello.
If domains use different application pools, please replace RewriteRule directive with RewriteProxy.
Thank you.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
Sa1k0 Newbie

Joined: 02 July 2009 Location: Netherlands
Online Status: Offline Posts: 19
|
| Posted: 08 July 2011 at 6:20am | IP Logged
|
|
|
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 |
|
| |