Forum Discussion
DaveC_21078
Altostratus
Aug 23, 2010Remove www before passing request to web server
Because of a licensing issue, we have to strip www. from the URL before passing it to the web server, if the user typed in www. So a request to www.mypage.com/blah/blah2... should get re-written mypage.com/blah/blah2.... I tried a simple redirect, when HTTP_REQUEST { HTTP::redirect ] }, but that didn't work at all. I think I can see why it wouldn't work, but not sure how to do it. Thanks in advance.
- Moe_Jartin
Cirrus
Dave,when HTTP_REQUEST { if { [HTTP::host] equals "www.mypage.com" }{ HTTP::redirect http://mypage.com[HTTP::uri] } } <\code> Joe Martin
- DaveC_21078
Altostratus
Thanks Joe. That fixed it.
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