Drupal, .htaccess and stats

Discussion in 'Tips/Tricks/Mods' started by 8omas, Apr 19, 2013.

  1. 8omas

    8omas Member HowtoForge Supporter

    I have noticed with Drupal 7 the stats folder (created by ISPConfig) is not accessible. The .htaccess of drupal in conjuction with the .htaccess of stats folder is (probably) the reason for that.
    A quick solution (leaving intact the .htaccess of Drupal, so as not to hack Drupal) is to ADD the line:
    ErrorDocument 401 "Unauthorized"
    ABOVE everything in the .htaccess of stats folder so it looks like this
    ErrorDocument 401 "Unauthorized"
    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /var/www/clients/clientXX/webYY/web/stats/.htpasswd_stats
    require valid-user
    More here: http://drupal.org/node/30334

    Does anyone know a better solution or am I the only one with this problem?

Share This Page