Forum Discussion
ukitsysadmin_95
Nimbostratus
Nov 10, 2009Keep original URL after HTTP::redirect
Hello
Aaron kindly wrote the following irule, which works a treat, but is it possible after the redirect to keep the original url in the browser ???
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: New [HTTP::method] request to [HTTP::host][HTTP::uri]"
if { [string tolower [HTTP::host]] starts_with "preview.www."} {
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to preview2.www.[getfield [string tolower [HTTP::host]] preview.www. 2]"
HTTP::redirect "http://preview2.www.[getfield [string tolower [HTTP::host]] preview.www. 2]" } }
although preview.www. has redirected to preview2.www can the broswer still say preview.www."any domain name"
- hoolio
Cirrostratus
If you want to keep the original URI, you would need to not redirect the client to a new URL. Instead you can rewrite the Host header using:
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