Results 1 to 4 of 4

Thread: Script to conceal or redirect an URL (Up to the directory)?

  1. #1
    Join Date
    Sep 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Script to conceal or redirect an URL (Up to the directory)?

    Hello, please help me:
    My Yahoo hosting provider show a visitor all my files inside a directory (when place the url without page name, just up to directory), I requested them, and they told me they don't have that feature, asking me to block the directories I need not show to visitors, but that is impossible... ¡doing that many functions and images wouldn't appear in the majority of my web pages!
    Do you know a Script in order to redirect a visitor to web page with a message i.e:"You don't have permission to see this page", when he/she place an URL up to the directoty name, without file name? i.e: (http://mysite.com/images/ <= Visitor can see all my website images)

    Thanks for your help
    God bless you

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Put a file in that folder called index.htm which is blank, or contains a "Permission Denied" message.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Sep 2004
    Location
    Indonesia
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Servers usually search for a default page in folder (index.htm, index.php, default.asp, etc, - depends on the server settings). If that file is not present, it will list all the file in that folder.

    If You want the browser to redirect to a certain page, add :
    Code:
    <body onLoad="location.href='http://mysite.com/index.htm'">
    in the index.htm cr3ative mentioned above.

  4. #4
    Join Date
    Sep 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thanks so much

    It is incredible, I cannot believe as the technical help of Yahoo could not say how to solve this problem , but with the suggestion of you (cr3ative and gigabites) they have solved what Yahoo was not able to... ¡I already proved it and it works perfect!!!

    Seriously thank you to both, without a doubt God has given them full gift of wisdom.
    greetings
    God blesses them.
    good-bye

    Edward

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
  •