Forum Discussion
greatme6_294653
Nimbostratus
Oct 09, 2016help!!!! with a question about web redirect
There is a trouble with me .our company have a domain name www.company.com ,now they want to input only company.com to redirect to the domain www.company.com .how can i do it to user irules to resolve the problem . thank you
3 Replies
- VernonWells
Employee
I recommend that you read this recipe:
It covers your exact use-case. However, in brief:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "company.com" } { HTTP::respond 301 Location "http://www.company.com[HTTP::uri]" } } - ssievers_87378
Nimbostratus
if { [http::host] starts with "company.com" }{ redirect " }
- greatme6_294653
Nimbostratus
thank you bro .i resolve the problem with a similar method . regards!
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