shawn306_84070
May 13, 2013Nimbostratus
Simple redirect rewrite
I have a site that is using the following url
https://propworks.abc.com/propworks
Now the default http to https redirect works
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
Now, they would like it if a user just types "propworks" in the browser it redirects to the https url above.
So I went and tried this and had no luck.
when HTTP_REQUEST {
if { [HTTP::host] eq "propworks" } {
HTTP::redirect "https://propworks.abc.com/propworks"
}
}
I then tried
when HTTP_REQUEST {
if {[HTTP::host] eq "propworks.abc.com"} {
HTTP::redirect "https://propworks.abc.com[HTTP::uri]"
}
}
That did nothing either...
any thoughts ? This reallly has me aggravated right now :)
Thanks
Shawn