Forum Discussion
gkorah_32913
Nimbostratus
Sep 16, 2010iRule for HTTP redirect
I am able to get http redirect working for a FQDN (eg - www.xyz.com), which I have it set to go to www.abc.com
The issue I run into is that the redirect to www.abc.com also works when the pa...
Chris_Miller
Altostratus
Sep 16, 2010Which of the following are you trying to do:
1. Only when a user hits "www.xyz.com", redirect them to "www.abc.com"
2. When a user hits "www.xyz.com/sample", redirect them to "www.abc.com/sample"
This would handle number 1:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "www.xyz.com" and [string tolower [HTTP::uri]] eq "/" } {
HTTP::redirect "http://www.abc.com" } }
This would handle number 2:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "www.xyz.com" } {
HTTP::redirect "http://www.abc.com[HTTP::uri]" } }
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
