WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
404 triggering by browsers looking up missing captcha files (6 posts)

  1. stevemagruder
    Member
    Posted 2 years ago #

    I think this minor issue has been occurring for a long time.

    In my 404 logs, I keep seeing items like "/wp-content/uploads/wpcf7_captcha/865238817.png" appear, sometimes in multiples. This particular example was triggered with 38 hits.

    Browsers and even search engine spiders are looking up these dead captchas.

    I'm not sure why there would be attempts to load captchas that are no longer there. This isn't a big issue, but if this could be solved, it would help clean up my 404 logs.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. stevemagruder
    Member
    Posted 2 years ago #

    I've found a potential solution that I just started testing.

    In the wp-content\uploads\wpcf7_captcha directory, there's an .htaccess file with the following code:

    Order deny,allow
    Deny from all
    <Files ~ "^[0-9A-Za-z]+\.(jpeg|gif|png)$">
        Allow from all
    </Files>

    I changed it to stop caching of these image files:

    Order deny,allow
    Deny from all
    <Files ~ "^[0-9A-Za-z]+\.(jpeg|gif|png)$">
        Allow from all
        Header set Cache-Control: "private, pre-check=0, post-check=0, max-age=0"
        Header set Expires: 0
        Header set Pragma: no-cache
    </Files>

    What do you think? Will this be helpful in this case?

  3. Barnez
    Member
    Posted 1 year ago #

    I have been experiencing the same problem, multiple 404s for a captcha image that was only generated temporarily for a message sent through Contact Form 7. A niggle really but as you point out, it does clog up the 404 logs. Has your edit to the .htaccess file resolved the problem?

  4. stevemagruder
    Member
    Posted 1 year ago #

    It's been a while but I don't think it worked, as I checked the .htaccess file and see that I reverted back.

  5. Barnez
    Member
    Posted 1 year ago #

    Thanks for checking and getting back. I've just tried adding the following line to the robots.txt file:

    Disallow: /wp-content/uploads/

    After sending several test emails the 404s are not showing up so far. Will keep an eye on it.

  6. stevemagruder
    Member
    Posted 1 year ago #

    Come to think of it, I've been using the following in robots.txt for several months:

    Disallow: /wp-content/uploads/wpcf7_captcha/

    The problem is -- it's not working, I think. I'm still seeing 404s from the captcha images. It's possible though that the problem is reduced from before, but I have no way to test it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.