Forum Discussion
Vishal_96707
Nimbostratus
May 26, 2009Redirection help
I need help with redirection.
Here is the config,
- The app VS is running on 443
- There is one more VS configured listening on port 80 which is just forwarding requests to HTTPS VS
- The app is running Jboss app server
- The app url is https:///abc/xyz/login.do. Even if you just type https:///abc/xyz, the app takes you to https:///abc/xyz/login.do
- The requirement is if someone types https:// then it should go to https:///abc/xyz or https:///abc/xyz/login.do
- As per the app guys the redirection from root to the specific uri is not possible using the app server
- I tried simple redirection using HTTP::redirect -> end page, but that is causing redirect loop
Can someone please assist?
- hoolio
Cirrostratus
Can you use a browser plugin like HttpFox for Firefox or Fiddler for IE to see what's actually happening? Can you try testing a rule like this:when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::local_port]: New [HTTP::method] to [HTTP::host][HTTP::uri]" if {[HTTP::path] eq "/"}{ log local0. "[IP::client_addr]:[TCP::local_port]: Redirecting to https://[HTTP::host]/abc/xyz/login.do" HTTP::redirect "https://[HTTP::host]/abc/xyz/login.do" } }
- Vishal_96707
Nimbostratus
Thanks Aaron for providing quick solution as usual. I will try this and let you know. Thanks again. - Vishal_96707
Nimbostratus
Thanks Aaron the solution worked. Here is one more issue surfaced. - hoolio
Cirrostratus
Does the application include the :9443 port reference in 30x redirects in the Location header value? Or in response content? For the Location header, you can use an iRule like this:
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