Welcome to WebmasterWorld Guest from 54.234.63.187

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Allow access to subdirectory only

     

imanewbe

7:36 am on Apr 14, 2014 (gmt 0)



I have a .htaccess file with the following in it
AuthName "Username and password required" 
AuthType Basic
AuthUserFile /home/john/www/.htpasswd
AuthGroupFile /dev/null
require valid-user


What I want to do is only allow access to a subdirectory rather than the directory that the htaccess file is in once they user has logged in.

Is this possible? If so how would I go about doing this?

phranque

12:50 pm on Apr 14, 2014 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, imanewbe!


What I want to do is only allow access to a subdirectory rather than the directory that the htaccess file is in once they user has logged in.

move that .htaccess file to the subdirectory.

lucy24

3:44 pm on Apr 14, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



That was my immediate response too, but then I thought there must be protected material in the outer directory. I think really we need more information. Among other things, can the directory structure be rearranged? Putting accessible content inside of inaccessible content doesn't seem the safest.

Granted, every website in the world does the same thing to some extent. Nobody can run wild in the / (physical top level) directory. But here we're on a deeper level.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month