Forum Discussion
KD_48848
Nimbostratus
Sep 10, 2008URI Rewrite
Currently www.abc.com/login.html is getting redirected to www.abc.com/private/login.html as per the code.
We have one authentication server in between which matches "/private/" in the ...
hoolio
Cirrostratus
Sep 10, 2008If you want to rewrite /private/login.html to /login.html, you can use a rule like this:
when HTTP_REQUEST {
Check if requested URI is /private/login.html
if {[HTTP::uri] eq "/private/login.html"}{
Rewrite URI to /login.html
HTTP::uri "/login.html"
}
}
This will rewrite the URI. If for some reason there is a query string for /private/login.html, it wouldn't get rewritten. If you want to rewrite the path (URI minus the query string), change both HTTP::uri's to HTTP::path.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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