Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Protecting directories from prying eyes
ruud, I’ve tested Gallery2 and it puts the image directory outside the web root with a fancy .htaccess file and uses a php script to grab the images, so I can relate to your earlier post.
The example .htaccess above doesn’t include all the directories, like /include or /lib, is it because these are safe to leave open or because it would cause problems?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Protecting directories from prying eyes
What my .htaccess example does is deny access by default and grant access only to the files mentioned. Since /lib and /include aren’t mentioned, you can’t access them. (just corrected a mistake, because you don’t need access to publish.php)
Last edited by ruud (2006-09-29 21:32:31)
Offline
Re: Protecting directories from prying eyes
ruud, I uploaded your .htaccess into 5 sites running 4.0.3 and 1 site that’s running what is to be 4.0.4 and I have no problems to report.
I uploaded an index.php to /files and /images containing 1 line:
<code><?php header(“Location: ../”) ?></code>
Now I feel better, thanks for taking the time.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#16 2006-09-30 11:37:26
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Protecting directories from prying eyes
It’s much simpler than that:
Options -Indexes
Offline
#17 2006-09-30 13:58:04
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Protecting directories from prying eyes
Mary wrote:
It’s much simpler than that:
Super! Thanks :)
Offline