Hello,

I seem to possibly be missing the obvious here. But wondering if anyone can shed some light.

I'm trying to have different url paths be routed to different backends.

frontend testdomain
  bind 172.16.0.17:80
  bind 172.16.0.17:443
  mode http
  acl redirectarchives path_beg -i /ua

  use_backend testbe if redirectarchives
#  default_backend stageweb

backend testbe
  reqrep ^([^\ :]*)\ /ua/(.*)     \1\ /\2
  balance leastconn
  option forwardfor
  server ext1 172.17.0.18:80 check port 80

I'm a bit confused on what the rewrite is doing.

Scenario:
-> user goes to testdomain.com/ua
--> works
-> user goes to testdomain.com/ua/test/
--> works
-> user goes to testdomain.com/ua/test
--> gets redirected to testdomain.com/test

I know the URL rewrite is the culprit because commenting it out does not exhibit the same behaviour. But I'm confused as to why the trailing slash works and non-trailing slash doesn't.

Any ideas?

Thanks,

- Anthony

Reply via email to