Answer the question
In order to leave comments, you need to log in
Nginx + rewrite individual links
There is a site configured on nginx+php-fpm. Let's call it example.com It is
necessary to do rewrites at the nginx level so that all requests are not
http://example.com/admin
redirected to a secure protocol.
https://example.com/admin
The remaining sections of the site should continue to work on regular http, only /admin redirects
. Any advice would be appreciated.
Answer the question
In order to leave comments, you need to log in
location /admin {
rewrite ^ https://example.com/admin permanent;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question