Forum Discussion
Bob_10976
Nimbostratus
Oct 22, 2008Redirecting Only Specfic URL Address
Hello All,
I've been task to setup a iRule that will redirect a url, subsite.mysite.com to mysite.com It actually seems pretty simple but the problem is subsite.mysite.com typically h...
Bob_10976
Nimbostratus
Oct 29, 2008Ok...Sorry...I didn't read your post very good the first time...the host name stays as "host" but the URI is "/"...
I changed my code to as follows and it works like a charm.... Thanks Denny!!
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] == "subsite.mysite.com") || ([string tolower [HTTP::host]] == "www.subsite.mysite.com")} {
if { [string tolower [HTTP::uri]] == "/" } {
HTTP::respond 301 Location http://mysite.com/
}
}
}
Thanks again...
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
