SSL redirect to naked domain only
Posted: Sat Sep 10, 2016 6:06 am
Hi everybody,
I followed this guide https://vestacp.com/docs/#how-to-force-https ,
This works fine but it always remove the "www",
Does anybody faced this problem and found a solution?
I downloaded the files but I don't know if there is something "wrong" there, this is what I found
I followed this guide https://vestacp.com/docs/#how-to-force-https ,
This works fine but it always remove the "www",
Does anybody faced this problem and found a solution?
I downloaded the files but I don't know if there is something "wrong" there, this is what I found
Code: Select all
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
location / {
rewrite ^(.*) https://%domain_idn%$1 permanent;
}
}