Question

Rewrite on nginx works for staging server, not live

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

NM. other issues. thanks.