Forum: Radiant CMS .htaccess for pages?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael J. (Guest)
on 2007-04-12 00:33
(Received via mailing list)
Hello-

I'm having a problem getting .htaccess to work on an area of my site.
Is anyone else using a .htaccess file to protect certain directories on
their radiant sites?

I have a secondary level page called 'staff'

http::/somesite.com/staff

I created a directory 'public/staff' and placed a .htaccess file in
there.

The .htaccess file is not working. Is it possible to do this? Are there
some other things I need to change?

Thanks-
Michael
Jacob B. (Guest)
on 2007-04-12 01:07
(Received via mailing list)
You might try putting your directive directly in the root .htaccess
file and then scope it down to /staff

example, put something like:

        <Directory /staff>
                AuthType Basic
                AuthName "Password Required"
                AuthUserFile /somewhere/staff.htpasswd
                Require valid-user
        </Directory>

somewhere BEFORE the call to:

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

As soon as Apache has called dispatch.fcgi, it's Rails handling
everything, and nobody is checking your htaccess
Michael J. (Guest)
on 2007-04-19 18:55
(Received via mailing list)
Thanks for the reply Jacob, this did work however when it authorizes
you it just renders a blank page and does not hand off control to
Radiant.

Since I was in a pinch I did some hacking and got it to work, but if
anyone finds a clean way to require authorization for a collection of
pages and still use Radiant please post it to the list, I think that
would be helpful.

Thanks-
MJ
This topic is locked and can not be replied to.