Computing.Net > Forums > Web Development > Avoid public access to site folders

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Avoid public access to site folders

Reply to Message Icon

Name: LeBabouin
Date: September 19, 2008 at 05:35:07 Pacific
OS: XP pro SP2
CPU/Ram: C2D
Comment:

Hello!

I have a personal static site written directly in HTML, say "mySite.free.fr". All the images are stored in an "images" folder.

How could I avoid people from being able to browse all the images stored in that folder by typing in the adress bar: http://mysite.free.fr/images

I need to keep this site pure HTML, but of course, I can add some javascript functions.

Thank you for your advices!

GigaByte 3D Aurora
Asus P5WDHDeluxe RAID 0
Intel Core 2 Duo E6700
2GB DDR2 Twin2X 800MHz
BFG nVidia 8800 GTS 512



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: September 20, 2008 at 09:45:30 Pacific
Reply:

Well, if you are just trying to prevent people from being able to "browse" that folder, just create a blank index.ht file and put it in that directory. then is anyone types the path to that folder they will just see a blank page (or better yet create a page that redirects to your home page).

However, if you are wanting to prevent people from hot-linking or directly navigating to specific image files, you would need a server-side language to do that.

Michael J


0

Response Number 2
Name: LeBabouin
Date: September 21, 2008 at 13:25:05 Pacific
Reply:

Thank you very much! I succeded to redirect to the site home page with a <meta> tag in an index.html.

GigaByte 3D Aurora
Asus P5WDHDeluxe RAID 0
Intel Core 2 Duo E6700
2GB DDR2 Twin2X 800MHz
BFG nVidia 8800 GTS 512


0

Response Number 3
Name: pball
Date: October 7, 2008 at 10:41:03 Pacific
Reply:

Hello

I've kinda wondered the same thing in the past so this topic helps me out too.

I have another question I'd like to stick in here. Is is possible to create a web page to list the contents of that folder? So if you go to the folder the blank or redirect page would show up, but if you go to indexhidden.htm for example it'd list the the contents of that directory.

I ask this since I broswe the directories of my website lots of the time but would like to protect them at the same time.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Avoid public access to site folders

FTP access www.computing.net/answers/webdevel/ftp-access/644.html

Public folders www.computing.net/answers/webdevel/public-folders/516.html

homepage link goes to index folder www.computing.net/answers/webdevel/homepage-link-goes-to-index-folder/3152.html