I need to append an hashbang - # to all of my requests to make my Javascript-based routing happy. It works as I want it to, but I get double slashes appended to my URL's making them look like this: http://www.example.com//page/2
What am I doing wrong in the config below?
server {
listen 80;
server_name example.com *.example.com;
location / {
root /var/www/example.com;
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^ /#$uri permanent;
}
}