Forum Discussion
Wendi_Goulette_
Jun 10, 2014Nimbostratus
ProxyPass 302 redirect possible?
Hello, I just implemented the ProxyPass irule for some headerrewrites and it's working beautifully. The only thing is my customer wants me to also do a redirect if the URL matches a certain string. ...
- Jun 11, 2014
Proxypass does not include redirect functionality that you can use for this. It only modifies traffic on the way to the server.
Your better off adding an iRule to do it.
when HTTP_REQUEST { if {[class search myclass equals "[HTTP::host][HTTP::uri]"]} { HTTP::redirect [class search -value myclass equals "[HTTP::host][HTTP::uri]"] } }
Then class myclass should contain text of the form...
Key Value old.host.com/url http://new.host.com/newurl old.host.com/url http://new.host.com/ old.host.com/url /mynewurl
Kevin_Davies_40
Nacreous
Proxypass does not include redirect functionality that you can use for this. It only modifies traffic on the way to the server.
Your better off adding an iRule to do it.
when HTTP_REQUEST {
if {[class search myclass equals "[HTTP::host][HTTP::uri]"]} {
HTTP::redirect [class search -value myclass equals "[HTTP::host][HTTP::uri]"]
}
}
Then class myclass should contain text of the form...
Key Value
old.host.com/url http://new.host.com/newurl
old.host.com/url http://new.host.com/
old.host.com/url /mynewurl
Wendi_Goulette_
Jun 26, 2014Nimbostratus
Thanks for your response!
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