Forum Discussion
Hai_Le_36697
Nimbostratus
Sep 24, 2010redirect wwwX.domain.com to www.domain.com
Hey guys,
I'm pretty new to iRule and this forum has really helped me get to where I am; however, I am stuck and I hope you guys can help. What I would like to do is to extract the domain ...
Hai_Le_36697
Nimbostratus
Sep 24, 2010I believe I have found the solution to my problem! Please let me know what you guys think and if you see any gotchas.
when HTTP_REQUEST {
if {[HTTP::host] starts_with "www10." or "www3."} {
{
set key "[concat [domain [HTTP::host] 2]]"
HTTP::respond 301 Location "http://www.$key[HTTP::uri]"
}
}
}
Thank you for your time.
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