Forum Discussion
DM_5174
Nimbostratus
Feb 08, 2011HTTP REDIRECT AND KEEPING URI AFTER DOMAIN NAME
Hi All,
I was wondering if I can get a little help here. I have an existing irule that will redirect and add the "www" if
users forgets to put this in...so if they type "http://mysite....
George_Watkins_
Feb 08, 2011Historic F5 Account
Hi DM,
You should be able to just append [HTTP::path] to the redirect URL. Maybe something like this:
when HTTP_REQUEST {
if { [HTTP::host] equals "mysite.com" } {
HTTP::redirect "http://www.mysite.com[HTTP::path]"
} else {
pool WEB_HTTP_POOL1
}
}
You can get much more elaborate, but that should solve the issue at hand.
-George
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
