|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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 |
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
#3 |
|
Staff
Premium Member
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.
|
|
|
|
|
|
#4 |
|
Member (14 bit)
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 )
|
|
|
|
|
|
#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. |
|
|
|
|
|
#6 |
|
Member (14 bit)
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??? |
|
|
|
|
|
#7 |
|
Staff
Premium Member
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|