Forum Discussion
Puli
Nimbostratus
Aug 17, 2010re-direct a URL but maintain the same URL in browser
i have a requirement as below.
From URL : http://serverA.com/eng/test.hml
This need to be re-directed or re-written to
To : http://serverA.com/global/eng/test.html ...
Aug 17, 2010
There are two ways to change the URL. The first is issuing a redirect to the client that tells the browser to make a new request to the new URL. This will update the browser's address bar with the new URL which isn't what you want.
The other option is to change the requested URI in the iRule before it's sent to the backend web server. This can be done with the HTTP::uri command. Something like this should do what you want
when HTTP_REQUEST {
if { [HTTP::uri] eq "/eng/test.html" } {
HTTP::uri "/global/eng/test.html"
}
}
The backend server will think the request came in for "/global/eng/test.html" when it really came in as "/eng/test.html".
Hope this helps...
-Joe
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