Hi Willy, sure.
I guess what i'd be writing with my knowledge of haproxy at the moment is one of these for every user:-
acl user1 url_beg /user1/mypage
redirect location http://mysite.com/user1/page code 301 if user1
It would be great if I could do:
acl user1 url_reg /(.*)/mypage
redirect location http://mysite.com/\1/page code 301 if user1
Prefix doesn't work in this context as the thing I want to change is after the value i'm capturing.
I've tried to think about how I could do it with the reqrep and rsprep but i'm finding it hard to get my head round. Especially since I really wouldn't like the request to hit a server when I want to redirect them.
Any help appreciated.
2009/12/2 Willy Tarreau <w#1wt.eu>:
> Hi Matt,
> On Wed, Dec 02, 2009 at 12:58:50PM +0000, Matt wrote:
>> I guess this can't be done at the moment? Is there a feature request
>> for this already?
>> > RewriteRule ^/([a-z]+)/mypage$ http://mydomain.com/$1/yourpage [R=301,L,NE]
> Sorry, but I'm unable to parse apache's cryptic rewriterules.
> You're saying that you want to perform a redirect which keeps
> some part of the request. Could you please post a concrete
> example of what you'd have in the request and what you'd like
> to see in the Location header ? There are some possibilities
> with the redirect statement (prefix, etc...) but maybe not what
> you're looking for. But maybe we can do it differently.
Received on 2009/12/03 11:13
This archive was generated by hypermail 2.2.0 : 2009/12/03 11:30 CET