SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2006
    Location
    Kathmandu, Nepal
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess. folder supports

    i am using Apache server (xamp) in windows 2000.

    i want to disallow user to list out the files in folders such as includes and images.

    eg:
    localhost/website/includes

    in Includes folder i have connection files based on php and other files also.

    what i want is when user type : localhost/webiste/inlcudes/ or localhost/webiste/inlcudes/connection.php

    i want user not to access that folder using .htaccess.
    Any one who can support me please.

    I will be waiting for the suggestion

    thanks
    Rahul - IT Professional

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    Rahul,

    Disallow directory listing:
    Code:
    Options -Indexes
    .htaccess to prevent http access (ignored by PHP's includes):
    Code:
    # put IN the directory you want to protect
    RewriteRule .? - [L,F]
    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •