Forum Discussion
Jesper_Hedin_42
Nimbostratus
Dec 16, 2005Change a 302 response header
Hello.
I wonder how to write an iRule that rewrites this HTTP response header:
Location: http://domain.com:8080/application-1.0/appLogin.do
to this one:
Locatio...
Jason_Adams
Feb 12, 2014Ret. Employee
This is old...but I haven't been able to find anywhere else where this has been addressed:
This may be ugly; but I believe it will get the job done.
** Note, this will not redirect from HTTP to HTTPS -- It will only remove the :PORT designation **
Please post a comment if you have found a better way to remove the port designation from an HTTP 302 Location Header.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::header replace Location "[URI::protocol [HTTP::header Location]]://[URI::host [HTTP::header Location]][URI::path [HTTP::header Location]][URI::basename [HTTP::header Location]]?[URI::query [HTTP::header Location]]"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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