Forum Discussion

Ravi_110217's avatar
Ravi_110217
Icon for Nimbostratus rankNimbostratus
May 28, 2008

HTTP page to be redirected on HTTPS page

HI,

 

 

I'm having an issue with redirecting following URL

 

 

I want to redirect URL from http://www.abc.com to https://www.abc.com

 

 

I have written following IRULE but does not seem to be working..

 

 

WHEN HTTP_REQEUST {

 

IF {[HTTP::HOST] eq "http://www.abc.com"} {HTTP::REDIRECT https://[HTTP::host][HTTP::uri] }

 

}

 

 

Thanks in advance...
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    I've always found that Host values are interpreted without case sensitivity on web servers and only IIS being case insensitive for paths in URIs. I tend to set the host to lowercase for comparisons as a developer or user might use mixed case.

     

     

    Aaron