homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Protect File Folders
Keeping the public from viewing content of folders
Senmar50




msg:1296399
 9:41 pm on Mar 26, 2006 (gmt 0)

How do I protect file folders like "stylesheets" "php scripts" etc, from exposing their directories to the public? If a visitors would come upon these folders, they would be able to see the content of the folder, and view the documents.

Thanks in Advance,
SenMar

 

smagdy




msg:1296400
 10:04 pm on Mar 26, 2006 (gmt 0)

Hi,

they wont be able to see php scripts, but they will be able to see style sheets.

But ive no experience if there is solution to stop both from being public.

Senmar50




msg:1296401
 10:17 pm on Mar 26, 2006 (gmt 0)

You are absolutely correct about php scripts. I didn't mean to include it. I have a small comments board on my site, if you click on the directory/folder name, you'll see the entire content of the folder. How can I keep the directory hidden, without creating an index.php page? Is there another way to do this?

Thanks in advance,
SenMar

Tastatura




msg:1296402
 11:26 pm on Mar 26, 2006 (gmt 0)

One way of doing it is to add .htaccess file to your folder and include this in it:

Options All -Indexes

HTH

Senmar50




msg:1296403
 11:33 pm on Mar 26, 2006 (gmt 0)

Thanks for your help!

SenMar

Habtom




msg:1296404
 1:39 pm on Mar 27, 2006 (gmt 0)

It could get a bit nasty but I put index.php pages in all the folders redirecting them to different pages according to the folder they try to access. It works well.

Habtom

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved