Forum Discussion
Brian_Saunders1
Mar 07, 2014Altostratus
ProxyPass Appending "/" to URI 404 Error
Hey All,
Need a bit of assistance here, thinking this should be an easy fix but I can't figure it out. Testing out the ProxyPass iRule so that when the end users enters a URL they get redirected b...
Mar 07, 2014
Hi!
That rule was cool! And complex. A brief look though showed a redirect that adds a "/". Has there been a redirect before the request in your pcap?
If there has, what happens if you remove it?
Please don't test that in prod, because I'm just wildly guessing.
Talking about this part:
if {$is_https == 1} {
HTTP::redirect "https://$orig_host$orig_uri/"
if { $static::ProxyPassDebug } {
log local0. "$log_prefix: Redirecting to https://$orig_host$orig_uri/"
}
} else {
HTTP::redirect "http://$orig_host$orig_uri/"
if { $static::ProxyPassDebug } {
log local0. "$log_prefix: Redirecting to http://$orig_host$orig_uri/"
}
}
return
Maybe change it to this:
if {$is_https == 1} {
HTTP::redirect "https://$orig_host$orig_uri"
if { $static::ProxyPassDebug } {
log local0. "$log_prefix: Redirecting to https://$orig_host$orig_uri"
}
} else {
HTTP::redirect "http://$orig_host$orig_uri"
if { $static::ProxyPassDebug } {
log local0. "$log_prefix: Redirecting to http://$orig_host$orig_uri"
}
}
return
/Patrik
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