Forum Discussion
CSA
Jan 17, 2011Nimbostratus
Simple reverse proxy
Hi,
I'm trying to do something quite easy but I can't make it work.
I have an irule like this:
[...]
elseif {[HTTP::path] starts_with "/admin"} { HTTP::redirect pool preprod_admin_pool }
[...]
My pool has two web servers listening on port 8082, and their document root is "/".
I would like to have "/admin" removed from HTTP:uri on the backend requests (ie client still use myhost.com/admin/)
Can I do this easily ? I had a look to reverseproxy big irule but it looks complicated for what I want to achieve.
Thanks,
- Chris_MillerAltostratusAre you trying to redirect the user to the page without /admin (first example below), or simply trying to remove the /admin between the LTM and pool member (second example below)? Also, are you trying to pass the request to a specific pool?
HTTP::redirect "http://[HTTP::host]/[string range [HTTP::uri] 6 end]"
HTTP::uri /[string range [HTTP::uri] 6 end]
- CSANimbostratusSorry, it was this :
- Chris_MillerAltostratusThanks for the explanation.
- CSANimbostratusI meant that my application is like a /index.html file in the document root with some
- Chris_MillerAltostratusSo:
- CSANimbostratus1. User requests http://myapp.domain.com/admin/ . It works, he gets let's say "index.html" file (thanks to your tip with HTTP::uri /[string range [HTTP::uri] 6 end]
- Chris_MillerAltostratusPosted By CS on 01/17/2011 08:27 AM
- CSANimbostratusno, index.html is using absolute links :
- CSANimbostratusraah "quick reply" cut my answer !!
- CSANimbostratusNo, index.html uses absolute links : for example, . I mean by absolute links, links absolute relative to the document root, not to the filesystem.
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects