How to redirect html to non-html using htaccess?

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]

Services

Latest News

Scroll to Top