Report this

What is the reason for this report?

Rewrite on nginx works for staging server, not live

Posted on June 23, 2017

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.



This textbox defaults to using Markdown to format your 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.
0

Accepted Answer

NM. other issues. thanks.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.