Jurgen following the rules I shared, maybe a different curl command or option shows you better. this is using the same rule I previously provided
curl --head shows the information you have not been seeing. [root@home htdocs]# curl --head http://192.168.0.99/ HTTP/1.1 200 OK Date: Thu, 27 Oct 2016 11:10:47 GMT Server: Apache/2.4.23 (Fedora) OpenSSL/1.0.2j-fips PHP/5.6.27 X-Powered-By: PHP/5.6.27 Content-Type: text/html; charset=UTF-8 [root@home htdocs]# curl --head http://192.168.0.99/de HTTP/1.1 301 Moved Permanently Content-length: 0 Location: /de [root@home htdocs]# curl --head http://192.168.0.99/de/index.php HTTP/1.1 200 OK Date: Thu, 27 Oct 2016 11:10:52 GMT Server: Apache/2.4.23 (Fedora) OpenSSL/1.0.2j-fips PHP/5.6.27 X-Powered-By: PHP/5.6.27 Content-Type: text/html; charset=UTF-8 X-Via: TEST However Michael's suggestion of "http-request redirect code 301 location %[capture.req.uri,regsub(^/de,)] if { path_beg /de }" looks even better. Regards Andrew Smalley Loadbalancer.org Ltd. https://www.loadbalancer.org/ On 27 October 2016 at 12:03, Michael Ezzell <[email protected]> wrote: > On Oct 27, 2016 6:41 AM, "Jürgen Haas" <[email protected]> wrote: > > > > Thanks Andrew, > > > > I still believe that your example is not redirecting, it is forwarding > > to the Apache server which responds with a 200 and the same content as > > before. > > > > But what we're loking for is a redirect which isn't the case here. > > It seems like you are looking for something like this: > > http-request redirect code 301 location %[capture.req.uri,regsub(^/de,)] > if { path_beg /de } > > Requires 1.6 or later. > Regards Andrew Smalley Loadbalancer.org Ltd. On 27 October 2016 at 12:03, Michael Ezzell <[email protected]> wrote: > On Oct 27, 2016 6:41 AM, "Jürgen Haas" <[email protected]> wrote: > > > > Thanks Andrew, > > > > I still believe that your example is not redirecting, it is forwarding > > to the Apache server which responds with a 200 and the same content as > > before. > > > > But what we're loking for is a redirect which isn't the case here. > > It seems like you are looking for something like this: > > http-request redirect code 301 location %[capture.req.uri,regsub(^/de,)] > if { path_beg /de } > > Requires 1.6 or later. >

