How to redirect single url in nginx?

By | May 31, 2015

We need to redirect something like: --> --> -->

this can be achieved in two ways:

location /issue {
   rewrite ^/issue(.*) http://$server_name/shop/issues/custom_issue_name$1 permanent;

location /issue1 {
   rewrite ^/.* http://$server_name/shop/issues/custom_issue_name1 permanent;
location /issue2 {
   rewrite ^.* http://$server_name/shop/issues/custom_issue_name2 permanent;

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.