cnuser
By:
cnuser

Rewrite on nginx works for staging server, not live

June 23, 2017 184 views
Nginx Ubuntu

production

    location /x/usa {
       rewrite ^/x/usa/or/john-day/john-day.* https://x.com/x/usa/or/john-day/john-day-oregon permanent;
    }

staging.

    location /x/usa {
       rewrite ^/x/usa/or/john-day/john-day.* https://staging.x.com/x/usa/or/john-day/john-day-oregon permanent;
    }

other differences besides subdomain...

  • staging has auth_basic setup
  • production has @prerender

I put this redirect at the top, right after the ServerName config so that it should do this redirect before trying anything else. It is still not working on production.

1 Answer
cnuser June 23, 2017
Accepted Answer

NM. other issues. thanks.

Have another answer? Share your knowledge.