PDA

View Full Version : Script to conceal or redirect an URL (Up to the directory)?



Edward
09-25-2004, 05:05 PM
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! :o
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 :)

cr3ative
09-25-2004, 06:35 PM
Put a file in that folder called index.htm which is blank, or contains a "Permission Denied" message.

cr3ative

gigabites
09-26-2004, 12:22 AM
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 :
<body onLoad="location.href='http://mysite.com/index.htm'"> in the index.htm cr3ative mentioned above.

Edward
09-26-2004, 09:22 AM
It is incredible, I cannot believe as the technical help of Yahoo could not say how to solve this problem :rolleyes: , 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