Is there any way to hide .html
extension from URL using JavaScript.
FOR ex:
mysite.html
hide.html here from url
Is there any way to hide .html
extension from URL using JavaScript.
FOR ex:
mysite.html
hide.html here from url
You cannot achieve this through javascript, this need to be done through .htaccess
file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
More information about mod_rewrite
module here.