How to redirect a domain with html extension in Nginx

A WordPress website needs to migrate to a different domain, on a new domain site use static HTML pages. On the source site, WordPress is configured to use URL like https://domain1/page-name/, on the new server, the same page available on URL https://domain2/page-name.html

To do the redirection, edit Nginx configuration for the website, on top of it (inside server entry), add

Restart Nginx

See Nginx Redirect

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *