Forum

Howto configuration Rewrite rules subdirectory

Thomas
15 June 2016, 23:44
Hello!

I want to configure Hiawatha reverse proxy for the following host domain
domain.tld

Any subdomain www.domain.tld/subdir should be redirected to //subdir.domain.tld/

Can you please share any advice how to configure this?

THX
Thomas
16 June 2016, 09:53
Please neglect the statement about reverse proxy. This is irrelevant for the question regarding "rewrite rules subdirectory".
Hugo Leisink
16 June 2016, 12:38
Make a virtual host for www.domain.tld and use UrlToolkit as specified below. Use a seperate virtual host for all other hostnames.
UrlToolkit {
ToolkitID = redirect_subdir
Match ^/(.+) Redirect http://$1.domain.tld/
}

VirtualHost {
Hostname = www.domain.tld
UseToolkit = redirect_subdir
...
}

VirtualHost {
Hostname = subdir.domain.tld
...
}
This topic has been closed.