Knowledgebase

How to Remove .html from your URL

 

   

To present a more professional appearance, you can easily eliminate .html from your website.

Create an .htaccess file and enter the following code:

RewriteEngine onRewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

 

This .htaccess code  will remove .html from all of your file names.

 

  • html, url, htaccess
  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution