Welcome to WebmasterWorld Guest from 54.162.168.187

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Allow access to subdirectory only

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

New User

5+ Year Member

joined:Nov 22, 2011
posts:1
votes: 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?
12:50 pm on Apr 14, 2014 (gmt 0)

Administrator

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

joined:Aug 10, 2004
posts:10847
votes: 61


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.
3:44 pm on Apr 14, 2014 (gmt 0)

Senior Member from US 

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

joined:Apr 9, 2011
posts:13682
votes: 446


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members