Forum Discussion
mkoushki_127802
Jan 03, 2006Nimbostratus
redirect http://domain.com to http://www.domain.com
Hello
I am looking for simple statment for iRule in v9.x to redirect http://domain.com to http://www.domain.com
please advice
thanks
- Colin_Walker_12Historic F5 AccountThe command that you're looking for is HTTP::redirect.
when HTTP_REQUEST { if {[HTTP::host] eq "domain.com" } { HTTP::redirect "http://www.domain.com" } }
- mkoushki_127802NimbostratusThanks
- Askar_Sattar_68Historic F5 Accountwell i am implementing your suggestion and i turn on the log,
- Have you logged the value of [HTTP::host]? If you are getting the log statement with match in it, then the host value that is coming is is not "domain.org".
log local0. "Host is [HTTP::host]"
- mkoushki_127802Nimbostratuslog showes that , it is http://www.domain.com but in browser i still can see http://domain.com
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