Forum Discussion
winifred_corbet
Nimbostratus
Jun 14, 2007Simple redirect for home page only
I need to redirect anyone coming in to http://www.somedomain.com to http://www.somedomain.com/cda/homepage.do in the meantime anyone coming in on http://www.somedomain.com/anydirectory still gets to that http://www.somedomain.com/anydorectory and does not get redirected to home page.
So I am try to just redirect the home page.
I am new to irules obviously.
- hoolio
Cirrostratus
I assume you just want to redirect based on the URI in the request and not the host. Here's an example that will send a redirect for / to /cda/homepage.do. All other requests will be unchanged.when HTTP_REQUEST { if {[HTTP::path] eq "/"}{ log local0. "redirecting client [IP::client_addr]" HTTP::redirect http://[HTTP::host]/cda/homepage.do } }
- winifred_corbet
Nimbostratus
Right, if the URI is just /, nothing else, we need to redirect to /cda/homepage.do. All other URIs do not need to be redirected.
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