Hi All, I have an SSL enabled domain.com, that strips away any www. prefix and redirects to https. Unfortunately this only works if a request is as follows: www.domain.com https://domain.com
if a user however tries https://www. it sends it over https but does not strip away the www.
I’m only having this issue with www. if the initial request is over https. I would really appreciate any help ideas on this.
Regards
Hi, thank you for the reply. After much diging around and trial n error, I came up with this:
http-request add-header X-Host-Redirect yes if { hdr_beg(host) -i www. }
acl host_redirect hdr_cnt(X-Host-Redirect) eq 1
reqirep ^Host:\ www.(.*)$ Host:\ \1 if host_redirect
redirect code 301 scheme https if host_redirect