Forum Discussion

Michael_60521's avatar
Michael_60521
Icon for Nimbostratus rankNimbostratus
Oct 05, 2011

https to https redirect without cert-broblem. for all but one url

I hawe two sets of websides :

 

1 : http://www.aaa.com

 

2 : https://www.aaa.com/cms/

 

3 : http://aaa.com

 

4 : https://aaa.com

 

 

 

http://www.aaa.com : this one have a iroute redirecting if the urls contains "/cms" to https://www.aaa.com/cms/ (works fine)

 

 

 

but if an user writes https://www.aaa.com we wants it to redirect to https://aaa.com

 

I have tryed with this one :

 

 

 

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] ends_with "/cms/" }{

 

pool web-node

 

} else {

 

HTTP::redirect "https://aaa.com"

 

}

 

}

 

 

 

 

 

but the browser comes up with an cert error (getting the cert for https://aaa.com)

 

 

 

any ideers ??

 

3 Replies

  • but the browser comes up with an cert error (getting the cert for https://aaa.com)what is cert common name? if it is www.aaa.com, cert error is due to fqdn (aaa.com) does not match the common name (www.aaa.com).
  • in the browser you write https://www.aaa.com (gets the redirect) and then the cert error (cert = aaa.com) but the browser still have www.aaa.com as url ... the url did not change before the certerror.

     

     

    make sense ?