Published on 03/07/2018
Published by amit
Creating 301 redirects in Nginx server
This tutorial assumes that your web server was setup using easyengine.
- Create the redirects.conf file within /var/www/example.com/conf/nginx folder.
- Write your redirect rules in the file created above, an example
123location /wp-content/uploads/2015/08/BannerContent-Onboarding.docx {return 301 https://example.com/onboarding/;}
- Save the file and on command line type, the command below to test the configuration file.
1nginx -t
- Finally, load the configurations for the nginx server using
1service nginx reload