Forum Discussion
Pav_70755
Sep 20, 2011Nimbostratus
HTTP Re-Direct uri replace?
I have the following rule written
when HTTP_REQUEST {
if { [HTTP::uri] contains "?storyId=" } {
pool STAGE_directmarketing.thomsonnet.co.uk-80
...
hooleylist
Sep 25, 2011Cirrostratus
I don't think you'd want to rewrite all 302s to 301s as that tells the client and any intermediate proxies to permanently cache the redirect.
If you want to skip just Locations which contain 2fwusjt568 you could use something like this:
when HTTP_RESPONSE {
if { [HTTP::status] == 302 and not ([HTTP::header Location] contains "2fwusjt568")} {
HTTP::respond 301 Location [HTTP::header Location]
}
}
Aaron
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