Forum Discussion
URL Rewrite Help
hi,
I am trying to write an IRULE for URL rewrite but and looked at the ones online but none seems to be working. The virtual server is set to "standard with default http profile and here is what I need:
https://abc.com Actual URL
https://abc.com/ui/ Re-written URL
https://abc.com/ Actual URL
https://abc.com/ui/ Re-written UR
https://abc.com/ui Actual URL
https://abc.com/ui/ Re-written UR
http://abc.com Actual URL
http://abc.com/ui/ Re-written UR
http://abc.com/ Actual URL
http://abc.com/ui/ Re-written UR
http://abc.com/ui Actual URL
http://abc.com/ui/ Re-written UR
any help will be highly appreciated.
thanks
when HTTP_REQUEST { if {[HTTP::path] eq "/"}{ HTTP::path "/ui/" } }
- QasimCirrostratus
Hi,
I tried this but it doesnt seem to be working.
Qasim What is occurring when you make this change? What are you seeing on your tcpdump between the F5 and the client? You can try adding the following line to see what you see in the F5 logs.
when HTTP_REQUEST { if {[HTTP::path] eq "/"}{ HTTP::path "/ui/" log local0. "The HTTP Path is now [HTTP::path]" } }
Are you running tests over HTTPS?
Does your VS decrypt this traffic with ssl profiles?- QasimCirrostratus
Hi,
the backend servers have http and https both services running and VS has no SSL pofile so no decryption on F5.
thanks
- Prasad4uNimbostratus
if {[string tolower [HTTP::Host]] equals "abc.com" } { HTTP::header replace Host "abc.com" HTTP::uri "/ui/" }
- Prasad4uNimbostratus
When HTTP_Request{ if {[string tolower [HTTP::Host]] starts_with "abc.com"} { HTTP::header replace Host "abc.com" HTTP::uri "/ui/" } }
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