Password protecting specific urls


#1

I have a site that is password protected with the standard:

AuthUserFile /home/username/userlist
Require valid-user

in .htaccess. It’s a rails app so also uses RewriteRule to send all links to the fast cgi dispatcher. However the problem I have is that I’d like a few files to be accessible without a password. Normally I’d do that with directives but they aren’t permitted in .htacccess and Files or FilesMatch directives don’t seem to have effect.


Marc


#2

Can you just put them in a separate directory?

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options


#3

No they are just rails actions. One of the actions is webmap/mapserver - so I want visitors to http://mydomain.com/webmap/mapserver to not be asked for a password but everyone else to be asked - but the problem is that all the urls are handled by rails (through RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]) so there is no directory webmap to put an htaccess file in.


Marc


#4

Yup, yup, I gotcha. I’ll have to put some thought into this later when my boss isn’t watching over my shoulder. :slight_smile:

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options