2

I'm trying to redirect all traffic from my www.old-domain.com to www.new-domain.com, while keeping all path and query parameters in the url, and append a new query parameter such as &from-old=true.

For example

www.old-domain.com --> www.new-domain.com/?from-old=true
www.old-domain.com/home --> www.new-domain.com/home?from-old=true
www.old-domain.com/item?id=123 --> www.new-domain.com/item?id=123&from-old=true

Please share some thoughts about how I should rewrite/return the url in Nginx to achieve this.

Thanks in advance!

Allan Jiang
  • 11,063
  • 27
  • 104
  • 165
  • Possible duplicate : https://stackoverflow.com/questions/6045020/how-to-redirect-to-a-different-domain-using-nginx – Pratik Shah Jun 20 '18 at 04:40

0 Answers0