Forum Discussion
youssef1
Jun 13, 2018Cumulonimbus
Hi Nawaz,
You right, you can use HTTP_REQUEST event to process you redirection. This event is used when the system fully parses the complete client HTTP request headers (that is, the method, URI, version, and all headers, not including the HTTP request body)...
In your case you can do it more easly:
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]]
set uri [HTTP::uri]
if { ! ($hostname starts_with "www.abc.com") } {
HTTP::redirect "http://www.abc.com$uri"
return
}
if { [HTTP::path] equals "/" } {
HTTP::redirect "/XYZ.Web/Login.aspx"
return
}
}
Regards