Creating 301 redirects in Nginx server

This tutorial assumes that your web server was setup using easyengine.

  1. Create the redirects.conf file within /var/www/example.com/conf/nginx folder.
  2. Write your redirect rules in the file created above, an example

     
  3. Save the file and on command line type, the command below to test the configuration file.

     
  4. Finally, load the configurations for the nginx server using

     

 

Updated on Jun 19, 2021