I have a static website. I am trying to add a trailing slash to all URLs.
I have removed the .html extension on all URLs and did a 301 redirect from .html to non .html. See the code below
location / {
try_files $uri $uri/ =404;
rewrite ^/cookies.html$ /cookies permanent;
rewrite ^/event.html$ /event permanent;
rewrite ^/faq.html$ /faq permanent;
rewrite ^/index.html$ /index permanent;
rewrite ^/terms-and-condition.html$ /terms-and-condition permanent;
rewrite ^/([^\.]+)$ /$1.html break;
}
How do I add trailing slashes to all the URLs so I can have /cookies/
instead of /cookies
?