Helpful Information
 
 
Category: Javascript
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! :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 :)

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

cr3ative

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.

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










privacy (GDPR)