I'm writing a single page application using Angular 1.4, and I'd like to add a rewrite rule to nginx using a regular expression so that an external link doesn't need to include the hashtag, and it will get added automatically, like this:
mywebsite.com/hotel/17263?guests=2 -> mywebsite.com/#/hotel/17263?guests=2
I want to avoid hard-coding the name of the website inside the rewrite rule. Also, because I have other assets being served from the same server, the rewrite rule needs to only affect those URLs that start with either /hotel, /hotels or /area, or that point to / (root directory).