• 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.

    https://www.ads-software.com/extend/plugins/contact-form-7/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter stevemagruder

    (@stevemagruder)

    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?

    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?

    Thread Starter stevemagruder

    (@stevemagruder)

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

    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.

    Thread Starter stevemagruder

    (@stevemagruder)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Contact Form 7] 404 triggering by browsers looking up missing captcha files’ is closed to new replies.