Forum Discussion
Rustic_57941
Nimbostratus
Oct 17, 2013Inserting "www" or redirecting to "www"
Hi,
My client has changed their back end servers from Coldfusion to Liferay.
The Tomcat within the new Liferay only accepts "http://www.example.com" so when users try "http://example.com" it fai...
Matt_Dierick
Employee
Oct 17, 2013You don't need to set a host variable. You can do something like that :
when HTTP_REQUEST {
if {string tolower [HTTP::host] equals "example.com" }
{ HTTP::respond 301 Location "http://www.[HTTP::host][HTTP::uri]" }
}
This should work.
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