Forum Discussion
May 12, 2008
How about this?
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::uri "/home"
}
}
I think this satisfies all your criteria.
1. for http://www.site.com/, URI is converted from "/" to "/home" and sent to the backend server. The browser doesn't need a redirect for this and the address bar stays the same (http://www.site.com)
2. There will never be a request of (http://www.site.com), as hoolio mentioned, the browser will append a slash to empty URIs, so the URI will always be at a minimum a slash.
3. All other URI's are left alone and sent as is to the backend servers.
-Joe