Server Administration & Management

How to Disable website pages download using wget by .htaccess

If you want to disable wget to grab your site pages then simply add the code below in the .htaccess file under public_html directory for which you wish to disable the wget grabbing.

SetEnvIfNoCase User-Agent “^Wget” bad_bot
<Limit GET POST>
Order Allow,Deny
Allow from all
Deny from env=bad_bot

Now, if anybody tries to grab info from your website using wget, he will receive a 403 error.

March 9, 2011 Posted by | Apache, htaccess | , , | 5 Comments