Please Help Me Any One..!

Discussion in 'Site & Server Administration' started by actress143, Jun 2, 2010.

  1. #1
    Dear friends..

    My problem is.., when i point any url just like..,

    www.example.com/test/


    ( Test is the folder name contains some files except index.html or php)

    Then it is showing....

    [​IMG]

    But how to redirect to some custome page.., ..... i mean i dont want to show those files


    is any thing i have to do with ..htaccess
     
    actress143, Jun 2, 2010 IP
  2. sysadmin

    sysadmin Peon

    Messages:
    111
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is called directory listing. If the index files missing there it will show the list of files in that folder . If you need to redirect it , please create a php file with the function "header" . Just google it for the code .
     
    sysadmin, Jun 3, 2010 IP
  3. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #3
    Well... you can do 2 things:

    1. Make index.html file and put it into that specific directory, so when someone tries to open it then he will see index.html page instead of files from that directory.

    2. Make .htaccess file in your main html directory, and put this line into it:

    
    Options -Indexes
    
    Code (markup):
    If you already have an .htaccess file then you can just insert this line at the beginning of your current .htaccess
    If you do not want to prevent directory listing for all folder, but you just want for this specific one, then just create .htaccess file in that folder and put the same line in it.
     
    pr0t0n, Jun 4, 2010 IP