Hi everyone,
I am running MODx 0.9.6.1 with SEO friendly URL’s enabled am having trouble protecting the awstats directory on my server.
I have this code in the .htaccess file in the MODx root dir:
RewriteEngine On
RewriteOptions Inherit
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
and in my awstats directory which is in the root, I have this code in the .htaccess file:
Options +ExecCGI
DirectoryIndex awstats.pl
#------ Start protect
AuthType basic
AuthName "Stats"
AuthUserFile /home/serveralias/domains/domainname.com/public_html/awstats/.htpasswd
AuthGroupFile /dev/null
Require valid-user
#------ End protect
Entering the URL: http:www.domainname.com/awstats/ --> If I take out the code between the ’Start protect’ and ’End protect’ comments, the stats load fine, but if I add the code I get a 404 MODx page.
Does anyone have any ideas?