theeohiostate Posted June 12, 2009 Share Posted June 12, 2009 Need help to restrict access to a directory of files, but also allow access to the flies within them , so they are visible if hotlinked example of what i want Allow Not Allow Quote Link to comment Share on other sites More sharing options...
cre8tiff Posted June 12, 2009 Share Posted June 12, 2009 Need help to restrict access to a directory of files, but also allow access to the flies within them , so they are visible if hotlinked example of what i want Allow Not Allow Reason why these need to be in the same directory? Otherwise, just change the read permissions on the directory you don't want open. Here is a good page for UNIX permissions setting. http://www.albany.edu/faculty/gms/homepage...ermissions.html Quote Link to comment Share on other sites More sharing options...
BiggieFries Posted June 12, 2009 Share Posted June 12, 2009 (edited) Need help to restrict access to a directory of files, but also allow access to the flies within them , so they are visible if hotlinked example of what i want Allow Not Allow In the apache config file (usually located at /etc/httpd/conf/httpd.conf) there's a directive in there that will allow directory listing. Do a google search for "apache directory listing" as I can't remember it off the top of my head. That should take care of it. ETA: Forgot to mention that once edited, you'll need to restart apache. The command should be apachectl -k restart. ETA 2: I forgot, you could also just add a blank index.html page to that directory. The file must be named index.html (or whatever the default filename that is set in apache is) Edited June 12, 2009 by BiggieFries Quote Link to comment Share on other sites More sharing options...
theeohiostate Posted June 12, 2009 Author Share Posted June 12, 2009 In the apache config file (usually located at /etc/httpd/conf/httpd.conf) there's a directive in there that will allow directory listing. Do a google search for "apache directory listing" as I can't remember it off the top of my head. That should take care of it. ETA: Forgot to mention that once edited, you'll need to restart apache. The command should be apachectl -k restart. ETA 2: I forgot, you could also just add a blank index.html page to that directory. The file must be named index.html (or whatever the default filename that is set in apache is) I just created a blank index.htm file............right before I saw your edited post, lol. That will restrict public view of directories when tracing back image urls I post Thanks for the help guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.