Rewrite on nginx works for staging server, not live


    location /x/usa {
       rewrite ^/x/usa/or/john-day/john-day.* permanent;


    location /x/usa {
       rewrite ^/x/usa/or/john-day/john-day.* 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.


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.