Reputation: 4202
I'm having a subdomain:
http://admin.domain.nl
But when i'm going to this site it should redirect me to my DirectAdmin site which is:
http://domain.nl:2222/
How to do this in the .htaccess file?
I've tried the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:admin\.)?domain\.nl$ [NC]
RewriteRule ^ http://domain.nl:2222/ [L,R]
but it's somehow not working and i'm getting a not found error from T-Online. How to fix this?
Upvotes: 1
Views: 1534
Reputation: 784908
Try this rule:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^admin\.domain\.nl$ [NC]
RewriteRule ^/?$ http://domain.nl:2222/ [L,R]
Upvotes: 1