I'm trying to redirect www.test.com to www.test.bla.com using UrlToolkit (I guess that's the right way to do it in hiawatha).
In apache2, the whole think looks like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.test\.bla\.com$
RewriteRule ^(.*) http://www.test.bla.com$1 [R]
I've read through https://www.hiawatha-webserver.org/forum/topic/626 but it doesn't work here:
VirtualHost {
RequiredBinding = blacom
Hostname = www.test.com
UseToolkit = redirect
ReverseProxy .* http://blacom/ 30
WebsiteRoot = /var/www/hiawatha
AccessLogfile = /var/log/hiawatha/blacom/access.log
ErrorLogfile = /var/log/hiawatha/blacom/error.log
}
VirtualHost {
RequiredBinding = blacom
Hostname www.test.bla.com
ReverseProxy .* http://blacom/ 30
WebsiteRoot = /var/www/hiawatha
AccessLogfile = /var/log/hiawatha/blacom/access.log
ErrorLogfile = /var/log/hiawatha/blacom/error.log
}
....
UrlToolkit {
ToolkitID = redirect
Match ^/(.*) Redirect http://www.test.bla.com/$1
}
Am I doing something wrong?