Nginx redirect if cookie present

前端 未结 1 807
你的背包
你的背包 2020-12-15 19:01

I\'ve seen some limited resources on checking for cookies with Nginx, but I couldn\'t really find the answer I was looking for, hopefully some of you Nginx masters can give

相关标签:
1条回答
  • 2020-12-15 19:44

    That makes sense. I would define another virtual host (beta.example.com) with that different root folder and upon encountering cookie - do a rewrite

    You can't set different roots for a domain conditionally, but you can redirect (rewrite) to another domain conditionally

    This guy's example helped me a bit ago http://nicknotfound.com/2009/01/12/iphone-website-with-nginx/

    0 讨论(0)
提交回复
热议问题