Forum

See Other Redirects

yacc
30 May 2016, 19:55
Hello,

i'm playing around with Hiawatha for a couple of days and find it quite interesting. However, i'm not sure, if i have already grasped all the concepts of Hiawatha. From reading the man page i got the impression that redirects are 301-Redirects by default. Would there be a way to emit other types of redirects esp. 303-Redirects (which are e.g. recommended for some linked data use cases)?

Thanks in advance
Hugo Leisink
30 May 2016, 20:35
HTTP has several redirect options, each with its own purpose. Hiawatha uses the 301 redirect, because it does what is needed. If your application needs another type of redirecting, your application should send the right HTTP code, which Hiawatha will pass on to the client.
yacc
30 May 2016, 20:58
Thanks for your prompt reply. In the specific scenario i was thinking about Hiawatha would be used to host a web site generated by a static page generator (like e. g. jeckyll). Though writing some script for implementing the desired function isn't much of a problem, it would be cool (and more elegant) to do this solely via the web server's facilities. But, if i understood you correctly, the approach of Hiawatha is to implement standard behaviour and leave "special wishes" to the specific web application -- thus what i have in mind isn't, what Hiawatha is intended for?
Hugo Leisink
30 May 2016, 22:16
But what is then not ok with Hiawatha's way of redirecting?
yacc
30 May 2016, 22:24
In the case of using 303-Redirecting for linked data, i guess it is ultimately more of a "philosophical" thing of getting the semantics right (cf. https://www.w3.org/TR/cooluris/#r303gendocument )
Hugo Leisink
31 May 2016, 22:57
I can't think of a situation where Hiawatha would better send a 303 than a 301. A 303 still sounds to me like something an application would send.
yacc
1 June 2016, 21:42
Unfortunately (for me ) i can't provide you with any striking examples either. Initially i thought, that UrlToolkit's redirect command could be extended by some parameter allowing those who need it to specify the type of redirect. From your answers i read that this approach might not fit into your concept. That seems understandable to me. Would be cool, nonetheless
This topic has been closed.