Forum Discussion
Sean_Gray_14855
Nimbostratus
Apr 29, 2014Redirect and Referer in iRules
Hi everyone,
I've got what I'm sure is a very simple problem. I am deprecating a URL and for a period of time want to do a 301 redirect and insert a "Referer" value on the redirected traffic so I ...
Sean_Gray_14855
Nimbostratus
Apr 29, 2014In the end I went another way. The "referer" piece didn't work so I added a query that I can track:
when HTTP_REQUEST { if { [HTTP::query] ne "" }{ HTTP::respond 301 Location https://foo.com[HTTP::uri]&fromFoobar=true } else { HTTP::respond 301 Location https://foo.com[HTTP::uri]?fromFoobar=true } }
- What_Lies_Bene1Apr 29, 2014
Cirrostratus
OK, cool, glad it's sorted. - Sean_Gray_14855Apr 29, 2014
Nimbostratus
Yeah, thanks for your help!
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
