0

Hide Web Page Extensions

It is something crucial for a web site’s security to hide the web page extensions. Many hackers would find it very easy to get into your website if they knew the type of your file. So whether yours is a .html page or a .php or any other, you should hide the extension. Eg: www.mysite.com/index.html should be more appropriate if it opens up as www.mysite.com/index. Read more about on how to hide web page extension here.

A very easy way to do is to update your .htaccess file. Edit and add the following code to it and it would do the needful.

RewriteEngine On
RewriteCond %(REQUEST_FILENAME) !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

ayesha

Leave a Reply

Your email address will not be published. Required fields are marked *