Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-22-2002, 07:32 AM   #1
Member (10 bit)
 
Join Date: Apr 2002
Location: Belgium
Posts: 850
how to block parts of my site?

can anyone tell me how i can protect the 'non html' of my site.
(ie if the page is /...../test/index.html
i want users to be blocked from the
/....../test/ part). so that they can only browse the html pages.
i hope this explanation is somewhat clear.

thanks in advance
__________________
Been there, broke that
grasshopperbe is offline   Reply With Quote
Old 12-22-2002, 05:20 PM   #2
N/A
Banned
 
Join Date: Oct 2002
Posts: 103
do you mean like "folder browsing"? if you dont have index.html or other default pages for server,people might be able to do directory browsing,where they can see all files in a directory.

to protect from this,you can use ".htaccess".add a command that disable dierectry browsing
if your host doesnt allow .htaccess,put default pages in every folder so that they will only see the default page,nothing more.
N/A is offline   Reply With Quote
Old 12-22-2002, 08:32 PM   #3
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Most hosts disable directory browsing by default. The basic way that it works is if there is not an index file, usually index.htm, .html, .cgi .php , then you will get a 403 error which is forbidden. It just means that since there is no index.htm file, and they can't browse the directory so they get the error.
mairving is offline   Reply With Quote
Old 12-23-2002, 10:41 AM   #4
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
however, if your host does not block folder viewing, just put an "index.html" in each folder. That will stop casual browsing, but not anyone that really wants to get in.
(What N/A said, in different words )
__________________
Black holes are where God divided by zero...
Cheers, Jim

Jims Modems
reboot is offline   Reply With Quote
Old 12-23-2002, 11:34 AM   #5
Member (10 bit)
 
Join Date: Apr 2002
Location: Belgium
Posts: 850
cool my start page is index.html
i have all my pages, in one folder, there's one folder for images and one for a number of javascript tryouts.
if i simply put an index.html in the java folder, my scripts will be (somewhat) protected? . i have frames in my page so "view source" only works for the framespage.
thanks for the help guys, been looking for this a while now.
grasshopperbe is offline   Reply With Quote
Old 12-23-2002, 12:00 PM   #6
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
That's the idea. having index.html in each folder means that browsers will ONLY be able to view that page. It loads no matter what.
If your ISP allows anonymous FTP (read only), then nothing is protected, but I'm sure they don't do that.
Try FTPing into your site, directly to a sub folder, see what happens.
Do the same with telnet.
Usually, everything is protected.
Try browsing to your java folder directly. Do you get a list of files, or a 403 or 500 error, or???
reboot is offline   Reply With Quote
Old 12-23-2002, 12:09 PM   #7
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
A couple of other things to keep in mind. One is that using frames does not prevent viewing the source, it merely slows it down. You can view source, then type in the main html page in the frame in your browser window. Then you can view the full source code.

Another thing to consider is that if you link to script or an image on a page, then it can be copied pretty easily by looking in your browser cache or right-clicking the image.
mairving is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:11 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2