 |

canvey
User
Sep 9, 2002, 10:50 AM
Post #1 of 5
(3047 views)
Shortcut
|
|
Protecting directories with .htaccess
|
Can't Post
|
|
Hi, Can anyone direct me as to how I can protect my cgi directories, and image directories, whilst still allowing the scripts to run - ie turn of browsing. I realise I can put in a simple html index page, but would rather find out how I can alter my .htaccess file. I have looked at various resources on the net, but not found the answer to what should be a very simple issue. Ian
|
|
|  |
 |

MalaK_3araby
User
Sep 10, 2002, 7:58 AM
Post #2 of 5
(3038 views)
Shortcut
|
|
Re: [canvey] Protecting directories with .htaccess
[In reply to]
|
Can't Post
|
|
Hello canvey .. i CHMOD my cgi-bin to 751 tp stop surfers reading the folder list. Re: .htaccess I have a web-page that i keep in my vault for refrence and i can't remember the source now .. but i will attach it here. Hope that helps. G-Luck -------------- Sure you can spell it, but do you get it?
|
|
Attachments:
|
WEB OFFICE - UNIX - PASSWORD.htm
(3.07 KB)
|
|
|  |
 |

Dave
Staff
/ Moderator

Sep 10, 2002, 12:51 PM
Post #3 of 5
(3030 views)
Shortcut
|
|
Re: [canvey] Protecting directories with .htaccess
[In reply to]
|
Can't Post
|
|
So all you want to do is turn off directory indexing so people don't get a list of files right? If so I think this is what you want: # .htaccess file Options -Indexes Note: Some servers let you "override" the default server settings with .htaccess files, some don't. If it doesn't work, that may be why. If you put the above line in an .htaccess in your webroot it should deny directory indexing for all folders below that. For more information on the "options" directive see: http://httpd.apache.org/docs/mod/core.html#options Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

canvey
User
Sep 10, 2002, 12:59 PM
Post #4 of 5
(3026 views)
Shortcut
|
|
Re: [Dave] Protecting directories with .htaccess
[In reply to]
|
Can't Post
|
|
Thanks Guys, I will try the htaccess suggestion, but if that fails, the chmod option. Cheers.
|
|
|  |
 |

MalaK_3araby
User
Sep 10, 2002, 7:28 PM
Post #5 of 5
(3019 views)
Shortcut
|
|
Re: [Dave] Protecting directories with .htaccess
[In reply to]
|
Can't Post
|
|
Excellent Tip Dave ... many thanks. <page bookmarked> -------------- Sure you can spell it, but do you get it?
|
|
|  |
|