Forum Discussion
Joe_Pipitone
Nimbostratus
Feb 09, 2010Trouble with rewrite rule
We have weekly newsletters that send out emails, and in these emails we have links to some case studies.
An example of a link is:
http://www.oursite.org/info.aspx?id=67727
This link is then redirected from another system to:
http://oursite.org/articles/2009/11/01/article-name-here.aspx
Our F5 contains an iRule that is supposed to strip the www first before it is then redirected. The stripping of the www in this case does not work.
The following iRule DOES work for all links outside of our newsletter emails, for example: http://www.oursite.org/somelink.aspx WILL strip the www and rewrite to http://oursite.org
If I copy and paste http://www.oursite.org/info.aspx?id=67727 into a browser and manually take out the www, the link works.
NOTE: The rewrite DOES work in Chrome and Firefox, but NOT IE.
Is there something wrong with the way that I am trying to catch www.oursite.org in the following iRule? Why would only IE not rewrite correctly?
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.oursite.org") } {
switch -glob [HTTP::host] {
"/" { HTTP::redirect "http://oursite.org" }
default { HTTP::redirect "http://oursite.org[HTTP::uri]" }
}
}
}
- Joe_Pipitone
Nimbostratus
Nevermind - this iRule is not the problem. I will post another message.
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