Here's the directory containing static html files
public |-- index.html |-- media | `-- blurred_image-8.jpg |-- post | `-- 13considerations | `-- index.html I am attempting to configure nginx to convert all the urls ending with .html to strip out the suffix.
Like this:-
server { listen 80; server_name mysite.com; location / { root /var/www/mysite/public; try_files $uri $uri/ $uri/index.html; } location /media/ { alias /var/www/mysite/public/media/; error_page 404 = /404; expires 30d; } location /static/ { alias /var/www/mysite/public/static/; error_page 404 = /404; expires 30d; } } This works properly for the homepage "http://mysite.com/" but if I attempt to access "http://mysite.com/post/13considerations/", I get a 500 internal server error.
What gives?