điều hướng website http sang https bằng htaccess

How to redirect html to non-html using htaccess?

Table of Contents

Redirect html page to non-html page,

Ex: Example.com/demo.html =>Example.com/demo

We need to add this code to .htaccess file

RewriteCond %{THE_REQUEST} \.html
RewriteRule ^(.*)\.html$ /$1 [R=301,L]