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 uri and if matches the keyword 'private' then it will skip the authentication process.
So if request are coming directly to www.abc.com/private/login.html, it is not authenticating with the authentication server.
We need to place a redirect where it will match the "www.abc.com/private/login.html" and should rewrite the uri to "www.abc.com/login.html"
We have tried to add a simple rewrite ans the host portion is the same.
Any one has any idea on how to achieve this.
Thanks in advance.
Thanks,
KD.
- hoolio
Cirrostratus
If 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" } }
- JRahm
Admin
And if you want to experiment with rewrites in general, Don wrote a handy little app to generate the rule for you:
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