Try moving it into your web-app (or web-app-default) block. You don't
mention which version of resin you're using, but I don't think you
want the server block for this type of rewrite. Also, are you sure you
want to use a moved-permanently? I'd think that would be more for
search engines since it sends a 301 back to the requester. That
request looks more like a user-level request and I'm not sure it's
going to help any to send a 301 back in that case (but I'm no expert).
Anyway, here's what I'd try (should work with moved-permanently, as
<web-app id="/" document-directory="webapps/ROOT"> (or whatever)
<redirect regexp="^/confirm/" target="/account/confirm/" />
On Jan 2, 2009, at 17:08, Rachel McConnell wrote:
> Hello all,
> I have a URL that I would like to permanently redirect. The
> original is:
> and I want to redirect it to
> In my resin.conf file, I have this code which does not work:
> <moved-permanently regexp="^/confirm/" target="/account/
> The result is that my application still gets the request for /confirm.
> I tried adjusting it to this (dropping the ^ character):
> <moved-permanently regexp="/confirm/" target="/account/
> In this case I get a circular redirect, a neverending URL like
> http://localhost/account/account/account/account/ ...
> where the /confirm/ is replaced by /account/confirm/, indefinitely,
> until the browser gives up. This is what I would expect. But I
> haven't any idea why the first one is wrong. Surely I am missing
> something very simple... Any help much appreciated, even a log level
> that might shed light on this (I tried some work with this but wasn't
> able to find any useful output).
> resin-interest mailing list
resin-interest mailing list