Posted on: 11/28/06 01:55pm
By: oskay
http://www.evilmadscientist.com/aslkhasgelkh
,
they get redirected to the 404.php page, which works quite well. The same thing happens if they request a non-existing page inside a subdirectory, like
http://www.evilmadscientist.com/layout/aogylhasdg
.
That's good. However, if they just go to the directory itself, like
http://www.evilmadscientist.com/layout/
,
they instead get a plain directory listing without any redirection to the main web site.
As Dirk said in that discussion (several years ago), the obvious solutions are to put a blank index.html file in each directory, or to modify the .htaccess file. I've done the latter and I'm very pleased with the result, so I'm putting it in both of my GL sites. Since I didn't see it written down elsewhere here, I thought that I should leave a note showing exactly how to perform this modification.
In the GL public_html folder, if you do not have one already, make a new file called .htaccess
In this file, put the following