Posts under Web Hosting

Block IP from accessing website using .htaccess

advertisement

To block certain ip address from accessing your website, just create a file with name .htaccess at your root directory with the content below:-

order allow,deny
deny from 192.168.0.1
allow from all

If you want to block multiple ip address using .htaccess simply add one ip address per line as below:-

Continue reading Block IP from accessing website using .htaccess »

Password protect directory with .htaccess and .htpasswd

advertisement

If you have some files to share among friends in your web server, you can use .htaccess to password protect your directory. To enable this password protect directory feature without any web control panel (ex: CPanel, Ensim, DirectAdmin or etc) is a bit troublesome. No worry, the tutorial below will teach you how to password protect directory using shell or CPanel.

To password protect your website folder with shell command:-

Continue reading Password protect directory with .htaccess and .htpasswd »

How to flush DNS cache in Linux / Windows / Mac

advertisement

Flush dns to get a new name resolution. Also flush dns cache when you can’t access a newly registered domain name. You can simply flush your dns cache anytime to get new entry. So, Flush your dns cache now.

To flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000):-

– Start -> Run -> type cmd
– in command prompt, type ipconfig /flushdns
– Done! You Window DNS cache has just been flush.

To flush the DNS cache in Linux, restart the nscd daemon:-

Continue reading How to flush DNS cache in Linux / Windows / Mac »