Forum

How to create 403/401 redirects?

JamesTheawesomeDude
23 June 2013, 16:06
Is there any way for Hiawatha to create a 403 or a 401 code, for example:

Someone requests:
http://www.jamestheawesomedude.cu.cc/minecraft_all.deb
They get redirected to:
http://resources.jamestheawesomedude.cu.cc/minecraft_all.deb
With either a 403 or a 401 redirect

Is this possible in Hiawatha? If not, is it being planned/coded?

Thanks,
~James

Hiawatha version: 9.1
Operating System: Debian GNU/Linux 7.0
Hugo Leisink
23 June 2013, 17:56
Yes, that's possible. You can use the UrlToolkit for that:
UrlToolkit {
ToolkitID = my_site
Match /minecraft_all.deb Redirect http://resources.jamestheawesomedude.cu.cc/minecraft_all.deb
}

The redirect will be done with a 301. Not a 403 or 401, because HTTP doesn't work that way.
This topic has been closed.