File url without the .html extension not working
If I visit example.com/page.html it will work
If I visit example.com/page it will give a 404
In the folder where they are stored the files end with .html
Is there a way I can make it go to exmaple.com/page.html but in the address bar show only example.com/page
And for it to work if I visit example.com/page and example.com/page.html
I am using this in kubernetes, is there a way to configure this without having to create my own version of the docker file?
perhaps something like try_files $uri $uri.html =404; to a configuration file after the pod is started and then restarting nginx?
https://kubernetes.github.io/ingress-nginx/examples/rewrite/
In: https://gitlab.com/ric_harvey/nginx-php-fpm/-/blob/master/conf/nginx-site.conf line 28
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ =404;
}
Edited by Jotcode