Simple url redirection not working (ssl)

Trying to redirect a request to the root of a webserver to a folder. Example, user types https://www.aaa.com and i want to redirect to AAA Sorry Page.

when HTTP_REQUEST {

if { not [HTTP::uri] contains “/bbb”} {

HTTP::redirect “AAA Sorry Page” }

}

Is the https my problem?

Thanks.

problem solved… does anyone see any problems with this:

when HTTP_REQUEST {

if { [HTTP::host] equals “www.aaa.com” } {

if { [HTTP::uri] equals “” or [HTTP::uri] equals “/” } {

HTTP::uri “/bbb” }

}}

Thanks.

Do you want an actual redirect response to be sent to the browser?

Thanks,

Brian

P.S. - Check out this wiki, it has a redirect example: http://www.vj.com/f5 Click here

It depends on how your virtual is set up. If you have only port 80 set up on your virtual, then the https will be problematic if you haven’t also set up a port 443 virtual on the same host. The redirection rule I use for clients that submit only the host or the host with the trailing slash is:

when HTTP_REQUEST {
 if { ([ string length [HTTP::uri] ] <= 1) } {
   HTTP::redirect https://[HTTP::host]/bbb
 }
}