Forum Discussion
Sami_Sheikh_140
Nimbostratus
Feb 21, 2014Hostname redirect to Subdirectory URL
Hi,
I am looking to create an iRule which would redirect users from: Http://example.com or https://example.com to https://example.com/example1/example.htm.
Currenty I have the F5 Virtual ap...
Thomas_Gobet
Nimbostratus
Feb 26, 2014Hi,
Just to avoid too many redirects you could apply this iRule to your http virtual servers.
when HTTP_REQUEST {
HTTP::redirect "https://[getfield [HTTP::host] ":" 1]/welcome/welcome.htm"
}
I think you'll have a problem with the second iRule because the redirect statement is not complete, you have to define the full URL.
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect "https://[getfield [HTTP::host] ":" 1]/example1/example.htm"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
