Forum Discussion
Bob_10976
Jan 23, 2012Nimbostratus
Limiting WWW redirect to just WWW
Hello all...
We have an irule in place that redirects www.domain.com to non domain.com version. This seems to work fine with one exception. If the end user goes to www.domain.com/blog then the...
Bob_10976
Jan 23, 2012Nimbostratus
Colin,Thanks! That sounds like what I want to do excatly. However I do have one follow up question. We host a lot of sites and I'm using an irule format that I'm not sure how I could incorporate your syntax into the current rulle. Below is an example of the rule we have in place..
when HTTP_REQUEST {
switch "[string tolower [HTTP::host]]" {
"domain1.com" -
www.domain1.com {
HTTP::respond 301 Location http://domainName.com
}
"domain2.com" -
www.domain2.com {
HTTP::respond 301 Location https://domain2.com
}
www.domain.com {
HTTP::respond 301 Location "http://domain.com/"
}
"domain3.com" {
HTTP::respond 301 Location "https://domain3.com/"
}
"domain4.com" {
if {[string tolower [HTTP::uri]] eq "/aer/"}{
HTTP::respond 301 Location "http://domain4.com/artsdirectory.aspx"
}
ETC.. ETC.. ETC..
I'm not sure how I would add that into the rule if the host I want to apply this to is say the 3rd one down. Any thoughts?v
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