Forum Discussion
Jason_40769
Apr 18, 2011Nimbostratus
Subdomain Redirect
I am trying to redirect subdomain and a domain name to have www but the F5 doesn't recognize the subdomain redirect. What I have:
when HTTP_REQUEST {
if { [HTTP::host] == "domain.com/member" } {
HTTP::redirect "www.domain.com/member"
}
if { [HTTP::host] == "domain.com" } {
HTTP::redirect "www.domain.com"
}
}
- Colin_Walker_12Historic F5 AccountI think what you're looking for is:
when HTTP_REQUEST { if {[HTTP::host] eq "domain.com" } { if {[HTTP::uri] eq "/member"} { HTTP::redirect "http://www.domain.com/member" } else { HTTP::redirect "http://www.domain.com" } } }
- Jason_40769NimbostratusActually this is working Great!! Thanks a lot! I thought i tried something similar to your rule but i was slightly off in the wording. Sad Face =(
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