Forum Discussion
benbenben_9082
Nimbostratus
Mar 07, 2007Redirects + keeping headers
What I am trying to do may seem a little weird...
Basically I am trying to capture the URL a client is visiting into a header which works fine. I then need to redirect the client to a specific webpage which of course breaks the header insert.
I've tried using the 'use pool' option within my iRule which retains the header however this will not accommodate the redirect I need.
when HTTP_REQUEST {
set host [HTTP::host]
set path [HTTP::uri]
HTTP::header insert "test" http://$host$path
}
Can anyone give any clues as to how I can include a redirect to a specific URL whilst retaining the header 'test'?
Thanks in advance!
Ben
- hoolio
Cirrostratus
Hi,when HTTP_REQUEST { if {$some_condition==1}{ HTTP::respond 302 Location http://www.example.com/ test_header_name "[HTTP::host][HTTP::uri]" } }
- benbenben_9082
Nimbostratus
Thanks for all your help so far, unfortunately that 'respond' directive didn't help.
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