[hunchentoot-devel] How to use redirect

Colin ge.xinying at gmail.com
Thu May 12 12:25:40 UTC 2011


Hans,

Thanks. I got it.

On Thu, May 12, 2011 at 6:27 PM, Hans Hübner <hans.huebner at gmail.com> wrote:

> Colin,
>
> there is no way to declaratively redirect requests in Hunchentoot like
> you would in an Apache configuration directive.  You need to install a
> dispatcher and handler and redirect the request when a matching
> request is received.
>
> -Hans
>
> On Thu, May 12, 2011 at 12:06 PM, Colin <ge.xinying at gmail.com> wrote:
> > Han,
> > Thanks for you reply.
> > I checked it and it seems that I did not find what I want.
> >
> > As you know, all the request from browser will be handled by
> > *dispatcher-table*, the code in the /test/handlers.lisp seems the
> Redirect
> > is used in a function.
> >
> > Another similar problem, how to deal with http 404 error, I want to
> redirect
> > it.
> >
> > Thanks
> >
> >
> > On Thu, May 12, 2011 at 1:31 PM, Hans Hübner <hans.huebner at gmail.com>
> wrote:
> >>
> >> On Thu, May 12, 2011 at 6:58 AM, Colin <ge.xinying at gmail.com> wrote:
> >> > I want to use 301 to redirect the request, but I don't know how to do.
> >> > e.g.:
> >> > Some one visit my app: http://www.xxxx.com, I want it redirect it to
> >> > xxx.com
> >> > I thinks I should use function redirect, but I don't know how.
> >>
> >> Please have a look at the documentation and at the file
> >> test/test-handlers.lisp, which contains an example of how the
> >> HUNCHENTOOT:REDIRECT function is used.
> >>
> >> -Hans
> >>
> >> _______________________________________________
> >> tbnl-devel site list
> >> tbnl-devel at common-lisp.net
> >> http://common-lisp.net/mailman/listinfo/tbnl-devel
> >
> >
> > _______________________________________________
> > tbnl-devel site list
> > tbnl-devel at common-lisp.net
> > http://common-lisp.net/mailman/listinfo/tbnl-devel
> >
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20110512/65e1bfe1/attachment.html>


More information about the Tbnl-devel mailing list