• Resolved Klark0

    (@klark0)


    This last update writes to the htaccess file in the directory where you log file exists to prevent access to the log file.

    For me that directory is the same as the wordpress uploads directory. All my images were 404’ing until I found the htaccess edit.

    I was already blocking .php files in that directory anyway.

    FYI.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi @klark0,

    That is really strange. What else was in the .htaccess file? The lines we added should really only restrict access to the file named mc4wp-debug-log.php so I am not sure why this wasn’t working as intended for you.

    I was already blocking .php files in that directory anyway.

    Perfect! It’s hard for us to check this from inside the plugin, so better safe than sorry. We mainly added the change because DreamHost seems to treat PHP files in the uploads directory as normal files.

    I’m having the same problem after updating the Mailchimp for WordPress plugin:

    Error log:

    /sites/mysite.ext/www/wp-content/uploads/.htaccess: </Files>#> directive missing closing '>', referer: https://www.google.com/.
    I’ve fixed it by removing below code, since my .htaccess already blocked .php files:

    # MC4WP Start
    <Files mc4wp-debug-log.php>
    deny from all
    </Files>
    # MC4WP End
    Plugin Author Danny van Kooten

    (@dvankooten)

    @marcobax Thank you for reporting. Could it be that the # MC4WP Start was not on its own line in your htaccess, but instead somewhere at the end of the line of what was already in the file?

    @dvankooten Yes, exactly. And for some reason the plugin restored the faulty htaccess even after I fixed it. The problem is that the MC4WP Start is not on its own line, as shown below from my htaccess:

    <Files *.php>
    deny from all
    </Files># MC4WP Start
    <Files mc4wp-debug-log.php>
    deny from all
    </Files>
    # MC4WP End
    Plugin Author Danny van Kooten

    (@dvankooten)

    Hey @marcobax,

    Fixed in version 4.7.2.

    If the faulty .htaccess file is still there, please fix it manually by entering a linebreak before # MC4WP Start or by removing the added section altogether. After that, the issue should not re-appear.

    Hey Danny,

    It may be the old syntax deny from all and apache 2.4. Just use require all denied and you’re all set.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘htaccess debug log file 404s’ is closed to new replies.