Forum Discussion
Joe_Pipitone
Nimbostratus
Dec 23, 2009Rewrite at the root of the domain
I have a rewrite rule that I'm already using to redirect the beginning of a domain request while keeping the URI as the user typed it in.
I want to redirect all requests to our-website.com/in...
Joe_Pipitone
Nimbostratus
Jan 07, 2010One question - it seems as though this rule is working, however if a user places a www in front of the domain name, it doesn't seem to catch it and redirect / rewrite:
when HTTP_REQUEST {
if { ([HTTP::host] eq "old-site.com") } {
switch -glob [HTTP::uri] {
"/" { HTTP::redirect "http://newsite.com/portals/water.aspx" }
default { HTTP::redirect "http://newsite.com[HTTP::uri]" }
}
}
}
old-site.com/someurl.aspx works, however www.old-site/someurl.aspx does not...
Can anyone help?
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