Hi Andrew, just not having luck with this. Here is my rule which is certainly used when e.g. calling https://www.arocom.de/de/team but it doesn't redirect to https://www.arocom.de/team
Any idea what's wrong? backend backend_aweb2_https acl r_host hdr(host) -i -n www.arocom.de acl r_path path_beg /de/ reqirep "^([^\ :]*)\ /de/(.+)" "\1\ /\2" if r_host r_path redirect prefix / code 301 if r_host r_path http-response add-header X-Via aweb2 server server_aweb2 1.2.3.4:80 maxconn 100 Thanks Jürgen Am 24.10.2016 um 11:23 schrieb Andrew Smalley: > Hello Jürgen > > In that case I think you will want something like > > > |acl de_url path_beg /de reqrep ^([^\ :]*)\ /de/\d+/(.+)/? \1\ /\2 > redirect prefix / code 301 if de_url | > > > > Regards > > Andrew Smalley > > Loadbalancer.org Ltd. > > > > On 24 October 2016 at 10:19, Jürgen Haas > <[email protected] > <mailto:[email protected]>> wrote: > > Hi Andrew, > > Thanks for your quick reply and yes, I'm using the manual almost daily. > But my question is not covered, I guess. > > Also your example is not working as it is always redirecting to the > front page, but we would require wildcards. > > Examples: > > http://www.example.com/de/page-one > <http://www.example.com/de/page-one> => > http://www.example.com/page-one <http://www.example.com/page-one> > http://www.example.com/de/page-two > <http://www.example.com/de/page-two> => > http://www.example.com/page-two <http://www.example.com/page-two> > > In other words, we just want to remove the "/de" subsctring from the > URL. Is that possible? > > > Thanks > Jürgen > > > > Am 24.10.2016 um 11:00 schrieb Andrew Smalley: > > Hello Jürgen > > > > Below is a link to the haproxy manual which will tell you exactly what > > you wish to know. > > > > https://www.haproxy.com/doc/aloha/7.0/haproxy/http_redirection.html > <https://www.haproxy.com/doc/aloha/7.0/haproxy/http_redirection.html> > > > > and something like this will be what you are looking to do > > > > |acl is_de path_beg -i /de acl is_domain hdr(host) -i www.domain.com > <http://www.domain.com> > > <http://www.domain.com> redirect code 301 location > > http://www.domain.com/ if is_domain is_de| > > > > > > > > Regards > > > > Andrew Smalley > > > > Loadbalancer.org Ltd. > > > > > > > > On 24 October 2016 at 09:53, Jürgen Haas > > <[email protected] > <mailto:[email protected]> > > <mailto:[email protected] > > <mailto:jurgenhaas-m5i1dm4aril35hdljg3a3a-xmd5yjdbdmrexy1tmh2...@public.gmane.org>>> > wrote: > > > > Hi all, > > > > one of my clients is looking for a wildcard redirect to get > redirects > > from www.example.com/de/* <http://www.example.com/de/*> > <http://www.example.com/de/*> to > > www.example.com/* <http://www.example.com/*> > <http://www.example.com/*> > > > > I know how to do just the opposite, but for this one I > couldn't find a > > solution in the documentation. > > > > Any chance that can be done? > > > > > > Thanks > > Jürgen > > > > > > >
signature.asc
Description: OpenPGP digital signature

