server { listen 443 ssl; server_name REPLACE_fqdn_ECALPER; ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem; root /var/www/tube.plomlompom.com/; # re-direct to .html endings location ~ ^/videos/watch/([^\.]*)/?$ { rewrite ^/videos/watch/([^\./]*)/?$ /videos/watch/$1.html permanent; } }