Forum Discussion
Sam_Hall
Nimbostratus
In the 1st attempt you are rewriting the uri that goes to the server, but the client thinks they are getting what ever page they actually requested. You are going to end up with a lot of extra path information being injected if for example the client already requested http://www.data.gov.bh/wps/portal/data/ it all looks very wrong.
The second attempt is going to cause redirection loops.
I think what you want is something like... if { [HTTP::host] equals "www.data.gov.bh" and [HTTP::uri] equals "/" } { HTTP::redirect "http://www.data.gov.bh/wps/portal/data" }
NewTOF501_15047
Jul 07, 2014Nimbostratus
it tried
when HTTP_REQUEST {
if { [HTTP::host] equals "www.data.gov.bh" and [HTTP::uri] equals "/" } { HTTP::redirect "http://www.data.gov.bh/wps/portal/data" }
elseif { [HTTP::host] equals "www.biciactions.bh" and [HTTP::uri] equals "/" } { HTTP::redirect "http://www.biciactions.bh/wps/portal/BICI" }
}
but still not working