|
From Team NetObjects member Prakash Thadani came up with this method of keeping folks from looking in directories that you just don’t want them looking in - it’s pretty cool, no? :)
Folks, we all know that in the absence of an Index.html file in a folder visitors get to see the directory structure of that folder, to me that is unprofessional and also unsightly.
I have a simple index.html file that redirects up one level to the index.html file in the higher level.
What I do is put this file in every folder that does not contain an index.html (like assets, autogen, images, etc) it sends the visitor trying to get to www.domain.com/assets or /html etc. to the home page.
<HTML> <HEAD> <META http-equiv="refresh" content="0; URL=../index.html"> <TITLE>Error Forwarding Page</TITLE> </HEAD> <BODY BGCOLOR="#000000" TEXT="#ffffff" LINK="#ffff00" VLINK="#80ffff"> <TABLE border=1 HEIGHT="100%" WIDTH="100%"> <TR ALIGN="CENTER"> <TD ALIGN="CENTER"><H1> You have come to this page in error. </H1> <H2> You may wait to be transported to the </H2> <H2> Home page of this site or <A HREF="../index.html"> Click here</A> </H2> </TD> </TR> </TABLE> </BODY></HTML>
... you will want to change the parts that read “../index.html” to lead up to the appropriate URL if you are publishing your site organized in a way other than “by Asset Type”, or if you put this file in a directory more than one level down from the “Home” page (you can add a “../” to the beginning of this path for every additional level down your folder is)
|