Hans,<br><br>Thanks. I got it.<br><br><div class="gmail_quote">On Thu, May 12, 2011 at 6:27 PM, Hans Hübner <span dir="ltr"><<a href="mailto:hans.huebner@gmail.com">hans.huebner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Colin,<br>
<br>
there is no way to declaratively redirect requests in Hunchentoot like<br>
you would in an Apache configuration directive.  You need to install a<br>
dispatcher and handler and redirect the request when a matching<br>
request is received.<br>
<font color="#888888"><br>
-Hans<br>
</font><div><div></div><div class="h5"><br>
On Thu, May 12, 2011 at 12:06 PM, Colin <<a href="mailto:ge.xinying@gmail.com">ge.xinying@gmail.com</a>> wrote:<br>
> Han,<br>
> Thanks for you reply.<br>
> I checked it and it seems that I did not find what I want.<br>
><br>
> As you know, all the request from browser will be handled by<br>
> *dispatcher-table*, the code in the /test/handlers.lisp seems the Redirect<br>
> is used in a function.<br>
><br>
> Another similar problem, how to deal with http 404 error, I want to redirect<br>
> it.<br>
><br>
> Thanks<br>
><br>
><br>
> On Thu, May 12, 2011 at 1:31 PM, Hans Hübner <<a href="mailto:hans.huebner@gmail.com">hans.huebner@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, May 12, 2011 at 6:58 AM, Colin <<a href="mailto:ge.xinying@gmail.com">ge.xinying@gmail.com</a>> wrote:<br>
>> > I want to use 301 to redirect the request, but I don't know how to do.<br>
>> > e.g.:<br>
>> > Some one visit my app: <a href="http://www.xxxx.com" target="_blank">http://www.xxxx.com</a>, I want it redirect it to<br>
>> > <a href="http://xxx.com" target="_blank">xxx.com</a><br>
>> > I thinks I should use function redirect, but I don't know how.<br>
>><br>
>> Please have a look at the documentation and at the file<br>
>> test/test-handlers.lisp, which contains an example of how the<br>
>> HUNCHENTOOT:REDIRECT function is used.<br>
>><br>
>> -Hans<br>
>><br>
>> _______________________________________________<br>
>> tbnl-devel site list<br>
>> <a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br>
>> <a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br>
><br>
><br>
> _______________________________________________<br>
> tbnl-devel site list<br>
> <a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br>
> <a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br>
><br>
<br>
_______________________________________________<br>
tbnl-devel site list<br>
<a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br>
</div></div></blockquote></div><br>