Forum Discussion
5 Replies
Sort By
- PeteWhiteEmployee
when HTTP_REQUEST { set referer [ HTTP::header Referer ] if { [HTTP::query] != "" } { set RedirectUrl "https://test.domain.com/?__referrer=${referer}&[HTTP::query]" } else { set RedirectUrl "https://test.domain.com/?__referrer=${referer}" } HTTP::redirect $RedirectUrl }
This should do that for you - the typo in referer is your own
- JohnathanNimbostratus
Thank Pete,
That is working now. Do you know if the referer header can do URL-encoding? Example:
referer=https://www.google.com/my_good_stuff?q=foo&bar=baz should be referrer=https%3A%2F%2Fwww.google.com%2Fmy_good_stuff%3Fq%3Dfoo%26bar%3Dbaz
- PeteWhiteEmployeeYou can use URI::encode with the set referer command which would be [ URI::encode [ HTTP::header Referer ]]