+ Reply to Thread
Results 1 to 20 of 20

Thread: http directory access

  1. #1
    chris is offline Registered User chris is on a distinguished road
    Join Date
    Sep 2002
    Posts
    6
    Rep Power
    0

    http directory access

    Is it possible to disable http directory access (browsing the directory from a browser) by default? I read in an earlier post that the .htaccess file in the www root controls this, but that user wanted to enable it. My root .htaccess file is empty. I can't use web protect because some of the scripts I'm using don't play nice anymore.

    Thanks,
    Chris

  2. #2
    Jim
    Jim is offline Admin Jim will become famous soon enough Jim will become famous soon enough
    Join Date
    Jun 2002
    Location
    Wauseon, Ohio
    Posts
    1,048
    Rep Power
    103
    If you put an empty index page in the directory it will prevent directory browsing.
    --

    Jim
    Page-Zone
    --

  3. #3
    chris is offline Registered User chris is on a distinguished road
    Join Date
    Sep 2002
    Posts
    6
    Rep Power
    0
    Hmmmm. The problem is that everything in that directory is owned by "nobody" since Gallary manages all the albums there. I can't place any files into the sub-directories.

    There isn't something that controls this type of access site-wide?

    Thanks, Chris

  4. #4
    Jim
    Jim is offline Admin Jim will become famous soon enough Jim will become famous soon enough
    Join Date
    Jun 2002
    Location
    Wauseon, Ohio
    Posts
    1,048
    Rep Power
    103
    Unless I'm missiing the point, which is very probable, directory browsing is supposed to be off. If you let me know the server you're on I'll check it.
    --

    Jim
    Page-Zone
    --

  5. #5
    chris is offline Registered User chris is on a distinguished road
    Join Date
    Sep 2002
    Posts
    6
    Rep Power
    0
    I'm not sure which server I'm parked on, or how to tell. Ohio maybe?

    www.novakfamily.net.

    From reading other posts, I had assumed directory browsing would be disabled by default, but as far as I can tell that isn't the case.

    Thanks, Chris

  6. #6
    jkwon is offline Registered User jkwon is on a distinguished road
    Join Date
    Oct 2002
    Location
    Redondo Beach, CA
    Posts
    12
    Rep Power
    48
    Jim,

    I'm on wwwroot2. I'd also like browser-based directory browsing turned OFF site-wide as well. It's on right now.

    Is there a way we can do this ourselves on a per-site basis? And, how can we turn it back on later if we want to?

    Thanks.

  7. #7
    broken1 is offline Registered User broken1 is on a distinguished road
    Join Date
    Oct 2002
    Posts
    63
    Rep Power
    51
    I've noticed the same think on wwwroot3

    -Craig

  8. #8
    Jim
    Jim is offline Admin Jim will become famous soon enough Jim will become famous soon enough
    Join Date
    Jun 2002
    Location
    Wauseon, Ohio
    Posts
    1,048
    Rep Power
    103
    The guaranteed way to control this would be to log into the control panel and go to the edit .htaccess function. Or for those more technically gifted "just edit your .htaccess file" by adding the follwing a line from the two shown below.

    Options Indexes
    Options -Indexes

    Choose the line you like the best. The first one turns directory browsing on no matter what the server itself is set to do. The one with the minus sign in front of it turns directory browsing (a.k.a. automatic indexing) off.
    --

    Jim
    Page-Zone
    --

  9. #9
    broken1 is offline Registered User broken1 is on a distinguished road
    Join Date
    Oct 2002
    Posts
    63
    Rep Power
    51
    Always good to know.

    Thanks Jim.

  10. #10
    jkwon is offline Registered User jkwon is on a distinguished road
    Join Date
    Oct 2002
    Location
    Redondo Beach, CA
    Posts
    12
    Rep Power
    48

    SWEET!

    Hey, alright!
    That worked like a charm. Thanks, Jim!

  11. #11
    prince's Avatar
    prince is offline Registered User prince is on a distinguished road
    Join Date
    Oct 2002
    Location
    Little Rock, AR
    Posts
    105
    Rep Power
    53

    I'm weird = I like to play

    I like to list or let others list some directories. But for the directories I don't want listed, I like to play with 'their' minds.

    So I put in a little index.php file that sends me an email when someone tries to list the directory. And I may (or may not) echo the info (make them wonder what I do with the info).

    To turn the 'message' off just remove 'echo message' at the bottom of this 'example script'

    And to use this script in your directories - just change the YOURDOMAIN so you get the email and name the file index.php (assuming there are no other index files in the directory :)

    Example: index.php

    <HTML>
    <HEAD>
    <TITLE>Block Directory Listing</TITLE>
    </HEAD>
    <BODY BGCOLOR="ivory" TEXT="darkblue">

    <?php

    $ip = getenv ("REMOTE_ADDR");
    $requri = getenv ("REQUEST_URI");
    $servname = getenv ("SERVER_NAME");
    $combine = " Dear" . $ip . " you visited " . $servname . " cause I saw you :) snooping around in directory = " . $requri ;

    $httpref = getenv ("HTTP_REFERER");
    $httpagent = getenv ("HTTP_USER_AGENT");
    $today = date("D M j Y g:i:s a T");

    $message = " $combine \n
    HTTP_REFERER = $httpref \n
    HTTP_USER_AGENT = $httpagent \n
    HitTime = $today ";

    $to = "folderblock@YOURDOMAIN.com";
    $subject = "Folder Blocker";
    $from = "From: folderblock@YOURDOMAIN.com\r\n";

    mail($to, $subject, $message, $from);

    echo $message
    ?>

    <h1> Sorry you've been 'tagged' for trying to view my directory :) </h1>


    </BODY></HTML>
    ***********
    Site index: http://www.ibdprince.com

  12. #12
    jkwon is offline Registered User jkwon is on a distinguished road
    Join Date
    Oct 2002
    Location
    Redondo Beach, CA
    Posts
    12
    Rep Power
    48
    Clever.

    Thanks for the code. I'm new to HTML (I design, but I don't code... yet), so I need all the help I can get.

  13. #13
    smgcircle Guest
    I've just signed up with page-zone and am trying to learn my way around. Can someone tell me where the "edit .htaccess function" is on my control panel. I've looked all over, and just can't find it.

    Thanks!

    Steve
    steve@gussow.us

  14. #14
    Jim
    Jim is offline Admin Jim will become famous soon enough Jim will become famous soon enough
    Join Date
    Jun 2002
    Location
    Wauseon, Ohio
    Posts
    1,048
    Rep Power
    103
    CPanel.net removed it but it is still editable through File Manager. If you click on the word (not the icon) of .htaccess in the public_html folder - the right hand side of the page will give several options. One of those options is "Edit". A text editor will open in a new window.

    edit - but they did add the ability to turn off (and on) directory browsing on a per directory basis in the link called "Index Manager"
    --

    Jim
    Page-Zone
    --

  15. #15
    stratplan's Avatar
    stratplan is offline Registered User stratplan will become famous soon enough
    Join Date
    Sep 2002
    Location
    Texas, USA
    Posts
    668
    Rep Power
    81

    Thumbs up great info:

    this is great info! I am trying to figure out how to capture it for future use, since I have a hard time remembering which message to look at to find goodies like this.

    I just went to my Cpanel (bluelagoonadvanced skin) and can't find the public_html folder. So I FTP'd to the account and there isn't a .htaccess file in the public_html folder there either. Where would I look next? I like the idea of editing the .htaccess file(s)

  16. #16
    richof's Avatar
    richof is offline Registered User richof is on a distinguished road
    Join Date
    Dec 2002
    Location
    Rhode Island
    Posts
    65
    Rep Power
    50

    Index manager

    I have found and understand the index manager in cpanel, but just FYI, it appears that indexing is ON by default. I have gone in and turned all to OFF. Your previous post indicated that the indexing should be OFF by default and it does not seem to be so.
    Ric Hoffman
    Hoffman Web Hosting
    http://hoffmanweb.com

  17. #17
    Jim
    Jim is offline Admin Jim will become famous soon enough Jim will become famous soon enough
    Join Date
    Jun 2002
    Location
    Wauseon, Ohio
    Posts
    1,048
    Rep Power
    103
    Indexing on/off depends on which particular apache build is installed on a given server which is one reason why the utility is there.
    --

    Jim
    Page-Zone
    --

  18. #18
    bennerstul is offline Registered User bennerstul is on a distinguished road
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    47
    If you need to see the .htaccess file and you are using WS_FTP - edit the site you are connecting to, go to Startup and enter -al in the Remote File Mask entry. This will show all files.

  19. #19
    fshagan is offline Registered User fshagan is on a distinguished road
    Join Date
    Dec 2002
    Posts
    50
    Rep Power
    49

    Re: great info:

    Originally posted by stratplan
    this is great info! I am trying to figure out how to capture it for future use, since I have a hard time remembering which message to look at to find goodies like this.

    I just went to my Cpanel (bluelagoonadvanced skin) and can't find the public_html folder. So I FTP'd to the account and there isn't a .htaccess file in the public_html folder there either. Where would I look next? I like the idea of editing the .htaccess file(s)
    I've discovered that my ftp program, WS_FTP doesn't show any of the .filename files ... .htaccess, .users, etc. I've looked through the Options, and can't find where you can turn on display of these files. But they are there.

    If you go into Cpanel, click on the "File Manager" icon on the top row, and you'll go into the site and be able to see all the files. You can edit it from there (I also have used the "File Manager" option to rename files that WS_FTP wouldn't upload until I renamed them something the program likes.)

  20. #20
    bennerstul is offline Registered User bennerstul is on a distinguished road
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    47
    Umm did you read my post right above yours? I explain how to see these files in the exact program you are using... Also, a simple search on Google will tell you all this a thousand times over.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. server wwwroot12 HTTP is down again
    By epsilonc in forum General Questions and Comments
    Replies: 0
    Last Post: 11-15-2006, 07:30 PM
  2. Replies: 0
    Last Post: 11-11-2004, 09:38 PM
  3. HTTP mail in Outlook is possible ?
    By jboavida in forum General Questions and Comments
    Replies: 1
    Last Post: 09-22-2003, 01:17 PM
  4. PHP file access and directory security
    By jwayne in forum General Questions and Comments
    Replies: 2
    Last Post: 07-15-2003, 11:13 AM
  5. Page Zone at http://www.whois.sc
    By junaidi in forum General Chat
    Replies: 2
    Last Post: 04-26-2003, 10:04 AM

Visitors found this page by searching for:

http akses

zapnutí nebo vypnutí procházení adresářů .htaccess

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Automatic Translations (Powered by Powered by Google):
Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Welsh Yiddish