Forum Discussion
Cory_12946
Jan 28, 2011Historic F5 Account
URL removal
Im sure this is a dumb question but here goes:
I need a irule/method to do the following:
client access a vip of any of the following:
http://www.abc.com https://www.abc.com
rewrite to
https://abc.com
Basically need to remove the www.
Help.
Thanks
- hooleylistCirrostratusHi Cory,
when HTTP_REQUEST { Check if requested host is not abc.com if {[string tolower [HTTP::host]] ne "abc.com"}{ Check if the request was mode on port 443 switch [TCP::local_port] { 443 { set proto https } default { set proto http } } Send the client a 302 redirect with the original URI preserved HTTP::redirect "${proto}://abc.com[HTTP::uri]" } }
when HTTP_REQUEST { Check if requested host is not abc.com if {[string tolower [HTTP::host]] ne "abc.com"}{ Rewrite the host header HTTP::header replace Host "abc.com" } }
- Cory_12946Historic F5 AccountThanks hoolio, I think the 2nd one is the way to go. They do not have wildcard certs so that will be an issue.
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