.htpasswd problems
Posted: Mon Jun 08, 2009 6:24 am
Hello all,
I did a search to see if a solution had been posted to this problem before, and this very similar to the problem I'm experiencing:
http://forum.cmsmadesimple.org/index.ph ... 386.0.html
I have CMSMS installed in the web root, and my .htaccess file contains this:
So I am using pretty URLs which work perfectly. But my problem now is that when I try and create a new password protected directory (like /secret for example), trying to access it via the browser returns a 404 instead of prompting for a username and pawword as I was expecting. If i remove the .htaccess file, the password pretection works as expected. I did a little debugging and figured out that it's the last three lines of the .htaccess file that are causing this problem, and unfortunately those are necessary for the pretty URLs to work.
I searched quite a bit and never quite found a simple fix for this that I could understand. Has anyone experienced this problem, and does anyone have any solutions or suggestions? Thanks in advance.
-m
I did a search to see if a solution had been posted to this problem before, and this very similar to the problem I'm experiencing:
http://forum.cmsmadesimple.org/index.ph ... 386.0.html
I have CMSMS installed in the web root, and my .htaccess file contains this:
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing
# slash to include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
I searched quite a bit and never quite found a simple fix for this that I could understand. Has anyone experienced this problem, and does anyone have any solutions or suggestions? Thanks in advance.
-m