Answer the question
In order to leave comments, you need to log in
How to properly set up a redirect from http && without www to https with www, at the same time, so that the redirects do not affect the /admin folder?
Hello,
Can you please tell me how to correctly set up a redirect from http and without www to https from www, at the same time, so that the redirects do not affect the /admin folder?
Currently configured like this:
server {
server_name site.com www.site.com;
rewrite ^(.*) https://$server_name$1 permanent;
listen ip:80;
}
server {
server_name site.com;
rewrite ^(.*) https://www.site.com$1 permanent;
listen ip:443;
ssl on;
ssl_certificate "/var/www/httpd-cert/site/site.com.crtca";
ssl_certificate_key "/var/www/httpd-cert/site/site.com.key";
}
server {
server_name www.site.com;
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question