My html page is showing .html at the end of url I want to remove that. Can anyone help me out. My url are like
mysitedoain.com/about.html
..../contact.html
My html page is showing .html at the end of url I want to remove that. Can anyone help me out. My url are like
mysitedoain.com/about.html
..../contact.html
Create a file called '.htaccess' in your root directory and rewrite it with this.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
You need to create an .htaccess file. In order to do that, open Notepad on your computer. In Notepad, input the following:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
In order to save the file, go to File > Save As. For the file name, call it “.htaccess” without the quotes. Change the Save As Type to “All Files.”
Once you have the file saved, upload it to your public_html folder on the server. The last thing you’ll have to do is remove .html from all of your file names.
You need to create a file called '.htaccess' in the root directory of your site containing the following code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
I hope this will work! after that you can access your pages without .html.