Forum

Convert 'Redirect to external website' .htaccess rules to?

Jason
14 February 2013, 22:39

I'm new to Hiawatha.

How can I convert 'Redirect to external website' .htaccess rules (below) to? .hiawatha file or use URLToolkit?

RewriteCond %{REMOTE_ADDR} ^xxx\.xxx\.xxx\.[0-9]+$ [OR]
RewriteCond %{REMOTE_HOST} badboydomain1\.com [OR]
RewriteCond %{REMOTE_HOST} badboydomain2\.com
RewriteRule .* http://www.externalwebsite.com/ [R,L]

Thanks,
Hugo Leisink
15 February 2013, 07:28
Hiawatha doesn't support hostname matching in an UrlToollkit rule. What you should do is use the default host as a catch-all and redirect from there.
UrlToolkit {
ToolkitID = redirect
Match .* Redirect http://www.externalwebsite.com/
}

Hostname = <your IP address>
...
UseToolkit = redirect
This topic has been closed.