How to access website without .html?

kumkumsharma

Administrator
Staff member
If you want to access your website www.domain.com/hosting but right now its working with www.domain.com/hosting.html.

For this you just have to use rewrite rule and it can be added in .htaccess file. You can either create this file or you already have it. You have to open .htaccess file and add below code in it:

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.htm$ $1.html [NC,L]
 
Top