Forum Discussion
lalrupchandani9
Altostratus
Apr 15, 2022Need help with URL re-write without a redirect
I have virtual server on F5 with an iRule and want to add a condition for a new re-write. I have to re-write complete URL without redirecting or changing the URL in client's browser. Tested the below...
- 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
spalande
Nacreous
Apr 15, 2022It 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.
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