Forum Discussion
Need help with URL re-write without a redirect
- Apr 20, 2022
you would need to work with the application team to find out which URL's are returning 404 and reason for it. Modify your iRule accordingly to resolve it
It appears the rewrite is working as expected. Few suggestions, you don't need check for the HOST header again so can modify it as below.
} elseif {[string tolower [HTTP::uri]] eq "/uri/path"}
{ HTTP::header replace Host "abc4.domain4.com"
HTTP::uri "/file.html"
set doStream 4
log local0. "[HTTP::host][HTTP::uri] Changed rewrite"
Also, in the response modify as below
STREAM::expression {@https://abc4.domain4.com@https://abc.domain.com@}
STREAM::enable
Make sure your pool (test-pool) is up. Take a tcpdump capture and see the traffic and reason for the RST. Plase ask to check the logs from the server end as well.
Hi Sanjay,
Thanks for your reply and it helped. Reset issue is resolved after bringing the pool members up using health monitor. Earlier there was no health monitor configured and members were in unknown state.
Now when I enter the original URL, it serves me the right content but URL in the browser also changes to https://abc4.domain4.com/file.html instead of keeping the orignal one: "https://abc4.domain4.com/uri/path".
Another observation is that using pool members with https/443 gives the reset while using http/80 serves the content but as a redirect as mentioned above.
Regards,
- spalandeApr 20, 2022Nacreous
This you would need to run tcpdump and check for the issue and also work with application team. There could be many causes for this like application is not configured to use TLS, TLS handshake is failing between BIGIP and the server etc.
Recent Discussions
Related Content
* 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