Forum Discussion
Mike_61640
Nimbostratus
Feb 20, 2009Redirect based on URI content
I have a couple of different requirements for a redirect.
I'm trying to first check the host name and if it doesn't include www in it, I need it added (i.e http://company.com should be ...
JRahm
Admin
Feb 20, 2009Issue 1:
This will redirect the client:
if { [domain [HTTP::host] 2] equals [HTTP::host] } {
HTTP::redirect www.[HTTP::host]
}
This will just fix the header, with no change in client's perspective:
if { [domain [HTTP::host] 2] equals [HTTP::host] } {
HTTP::header replace Host "www.[HTTP::host]"
}
Issue 2:
Is this also for the same rule as Issue 1? If so, in which order should they be evaluated? it can't be sent to both www and sub.
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