Forum Discussion
Govin_48123
Nimbostratus
May 12, 2008Masking the URI and also redirecting!
Hi Gurus,
Below is the scenarios I am trying to implement, and need some help,
Case 1)User Types in http://www.site.com/, the application server basically does a 301 redi...
hoolio
Cirrostratus
May 12, 2008A few comments:
- if a client types in www.example.com (without any path), the browser will append a forward slash to the URL (http://example.com) and the path will be "/"
- if you send a redirect to the client with a 30x status, the browser will make a request to the Location header value
- if you send a 20x response to the client, the client will ignore any Location header value as it's not an expected header
It sounds like you just want to redirect clients who request the root document to /home and send all other requests to the VIP's default pool. If that's the case, this rule should work for you:
when HTTP_REQUEST {
if {[HTTP::path] eq "/"}{
HTTP::respond 301 Location "http://site.com/home"
}
}
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