deny indexing from apache

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mIDO
    Junior Member
    • Mar 2004
    • 28

    #1

    deny indexing from apache

    hi, somebody knows how to deny indexing a directory?
    For example, if apache doesn't find any index file(index.htm,index.php...) by default apache show a full list of the files inside the folder. How can i deny this listing? (i've seen that redirects to a 403 page, forbidden)


    thanks
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    This can be setup in cPanel for the particular domain.

    Comment

    • Jonathan
      Senior Member
      • Mar 2004
      • 1229

      #3
      Hmm; I wonder, is there perhaps
      a way (perhaps a PHP.ini file to a certain folder?)
      to make it so all sites I host, if it goes to a folder
      that does not have a index file (index.htm, .html, etc.)
      could it automaticly be directed to a page I setup?
      "How can someone be so distracted yet so focused?"
      - C

      Comment

      • mIDO
        Junior Member
        • Mar 2004
        • 28

        #4
        thanks andrew, i hadn't seen this option.
        Now it works

        Comment

        • sdjl
          Senior Member
          • Mar 2004
          • 502

          #5
          If my thinking is correct, if you setup the option in cPanel to deny access to folders without an index file, then any person trying to access said folder will be thrown a 403 error.

          So to get a 403 to point to a custom page, you'd setup a .htaccess file like so:

          Code:
          ErrorDocument 403 /error.php
          -----
          Do you fear the obsolescence of the metanarrative apparatus of legitimation?

          Comment

          Working...