I have a directory of files that require a login to access (AuthMySQL). That all works except there are 3 files that I want to allow without login. I am guessing the way to accomplish this is with FilesMatch. However, I can't seem to come with a working structure. Does this directive go inside the <Directory> block or does the <Directory> block go inside <FilesMatch>? TIA.
After playing with this a lot, I may or may not be making progress but I am getting something with <FilesMatch> inside <Directory>. However, what I am getting is odd. Here is my config for that directory: <Directory "/var/www/html/cufs"> AuthName "CUFS Alumni" AuthType Basic AuthMySQLUser uuuuuuuuu AuthMySQLPassword ppppppppp AuthMySQLEnable on AuthMySQLPwEncryption scrambled AuthMySQLDB cufsalumni AuthMySQLUserTable alumni AuthMySQLNameField username AuthMySQLPasswordField pwdp <FilesMatch "^(?!index\.html$|cufsregister\.php$)"> require valid-user </FilesMatch> </Directory> Code (markup): What is happening, is if I do not specify index.html in the URL (just specify the directory) it prompts for the log in. If I then cancel the prompt, the 401 error is displayed. However, if I put index.html into the URL and click the log in link, there is no prompt and all the pages are available with no login. Does this make sense to anyone?
this may be what your loooking for.. http://www.snippcode.com/snippet/.h...tect-your-entire-site-except-certain-pages-51