Posts tagged with ‘.htaccess’

How to avoid duplicate content using .htaccess

advertisement

htaccessIf domain.com and www.domain.com has same content, Google will think it as duplicate content. However, you can use .htaccess to avoid duplicate content. Solution is to redirect your visitor to one of the domain, either with www or without www. The trick below is a simple yet effective way to avoid duplicate content on the same domain.

To avoid duplicate content using.htaccess, follow the steps below:-

Continue reading How to avoid duplicate content using .htaccess »

How to block access to certain file types using .htaccess

advertisement

linuxIt’s a good practice to block visitor access to file types that is not being used in web server. You can configure .htaccess to block access to specific file types (eg: inc, bak, log, sh). It’s common for webmaster to edit files at the server and rename the old filename to .bak. If your file contain sensitive information like login credentials, then your info will be expose to public.

To block access to certain file types using .htaccess, follow the steps below:

Continue reading How to block access to certain file types using .htaccess »

Limit certain ip to access website with .htaccess

advertisement

Many friends ask me to limit only certain ip are allow to access their website. To limit specific ip to access website is easy with .htaccess. Just follow the steps below and you will be able to set your website to be view by specific ip:-

Continue reading Limit certain ip to access website with .htaccess »