Forum Discussion
301 Redirect but Adding Original URL and Referrer
Thanks Kees.
I got it to work but app owner says that they are seeing below,
Location: https://https://NEW-APP.com/redirect?url=http://old-app.com-help/URI/URI1/URI2/URI3
Instead of this,
Location: https://NEW-APP.com/redirect/?url=http%3A%2F%2Fold-app.com%2FURI%2FURI1%2FURI2%2FURI3
They also want to have a cache-control header
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Also the referrer does not seem to work as F5 doesn't include the referrer in the redirect URL.
TIA.
Hi TIA,
Can you post the irule here?
Cache control header is not a request but a response header. So this can not be included in a redirect.
You need separate code in the irule:
when HTTP_RESPONSE {
if { [HTTP::header value Content-Type] contains "application/pdf" } {
HTTP::header replace Pragma public
HTTP::header replace Cache-Control public
}
elseif { [HTTP::header value Content-Type] contains "application/vnd.ms-excel" } {
HTTP::header replace Pragma public
HTTP::header replace Cache-Control public
}
elseif { [HTTP::header value Content-Type] contains "application/msword" } {
HTTP::header replace Pragma public
HTTP::header replace Cache-Control public }
else {
return
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
