When setting up https on an existing server, you need to provide a redirect for all those visitors arriving via http backlinks. Here is how to do this.

Cyber security, infotech

When setting up https on an existing server, you need to provide a redirect for all those visitors arriving via http backlinks. Here is how to do this.

To redirect a subdirectory in NGINX, use this location block (an example for https):
location /old-subdirectory {
return 301 https://$server_name/new-subdirectory/;
}
For more NGINX redirects see this post: RegEx Bliss: Set Up URL Redirects in NGINX Using Regular Expressions without Rewrites.
©2022 CybrAnalytiqa OÜ