Forum Discussion
gr0x_33657
Nimbostratus
Aug 13, 2009Redirect HOST and URI
I would like to redirect any domains to include www and also keep the URI, for example,
domain.com/folder2
to
www.domain.com/folder2
I have this rule but it does not keep the URI
when HTTP_REQUEST {
if { !([HTTP::host] starts_with "www.") } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
- The_Bhattman
Nimbostratus
I think I see where the problem iswhen HTTP_REQUEST { if { [HTTP::host] eq "domain.com" } { http::redirect "http://www.[HTTP::host][HTTP::uri]" } }
- gr0x_33657
Nimbostratus
Thx it worked
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