Forum Discussion
Vince_Campbell_
Nimbostratus
Apr 24, 2014Changing url from abc.com to www.abc.com while maintaining all uri
I am trying to accommodate the developers by redirecting http://abc.com/ to http://www.abc.com/ and keeping everything after the "/".
So I would need http://abc.com/locations/ to be http://www.abc.com/locations and http://abc.com/any/ to be http://www.abc.com/any/
I have the following in place, but it is not working. when HTTP_REQUEST { if { [HTTP::host] equals "abc.com" } { HTTP::redirect "http://www.abc.com" } }
Any help would be appreciated.
1 Reply
Try this:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "abc.com" } { HTTP::redirect "http://www.abc.com[HTTP::uri]" } }
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