Simplified nginx rewriting and fixed missing var in twig template