Forum Discussion
Uri redirection
Hello all I have the following problem i need to forward my http/s requests to a different directory than the user wrote at browser i mean www.mydom.com/somethingA/somethingB ---> To ---> webserver/somethingC
But the user should see www.mydom.com/somethingA/somethingB at browser. I user to have the same structure at webserver than the http request. Is that possible?
I´ve tried to modify the uri but at least at browser i see www.dom.com/somethingC and i had to add
when HTTP_REQUEST { set uri [string tolower [URI::decode [HTTP::uri]]]
if { $uri starts_with "/somethingc" } { node X 80
} elseif { $uri starts_with "/somethinga/somethingb" } { set uri [string map -nocase {"/somethinga/somethingb" "/somethingc"} [HTTP::uri]] log local0. "New URI = $uri" node x 80 HTTP::uri $uri
But this structure at the end i see at browser http://www.mydom.com/somethingc
Thxs Nacho
1 Reply
- kunjan
Nimbostratus
Instead of iRule have you checked out using rewrite profile 'rewrite-uri-translation'?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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