Block wget and similar programs (3 posts)

  1. nelson-ray
    Posted 9 years ago #


    I just found out that my wordpress blog can be downloaded in its entirety with wget. Could someone provide help to prevent this from happening?

  2. Not sure why this is a problem but hey, to each their own.

    This is not really worth doing at all since wget can change the User-Agent string with a simple command line argument.

    If you are using Apache then in your blog root add to the end of your .htaccess file the lines

    RewriteCond %{HTTP_USER_AGENT} ^wget
    RewriteRule .* - [F]
    RewriteCond %{HTTP_USER_AGENT} ^Wget
    RewriteRule .* - [F]

    Which will stop the casual wget user with a 403 Forbiden code.

  3. nelson-ray
    Posted 9 years ago #

    Hey thanks,
    The reason why I would like to do this is because I will try to stream videos and my bandwidth would be hosed if people tried to download it with wget. On a similar note what would be the best method to store multimedia files so that people could not download the whole directory?

Topic Closed

This topic has been closed to new replies.

About this Topic