Change .htaccess to move rewrite rules out and use FilesMatch instead.
Use a template base.jinja2 as the base template for rendering.