View Full Version : Directory pages?
sirbeavis
05-03-2007, 03:31 PM
When I add files to a directory and I go to that directory it shows up for example
mydomain.com/test/
will show the contents
test.php
file2.php
Unless I put in an index file any way to turn that off so It goes to another page, ive seen it before and I'm still trying to find out how to use the server configs.. (I notice you really need to understand the terms more then anything when searching and I cant for the life of me figure out the terms for this)
SnakEyez
05-03-2007, 03:45 PM
You will need to make an htaccess file to determine what file should be shown.
This is a very good tutorial here:
http://www.javascriptkit.com/howto/htaccess6.shtml
If you are looking for a redirect option (ie: if you type in that address you get sent to an error page or something else):
http://www.javascriptkit.com/howto/htaccess7.shtml
The first page of that tutorial will show you the steps in creating this type of file on a Windows PC (links are at the bottom of the page). If you are using a Mac post back and I will explain the steps of making this file on a Mac since it is slightly different.
sirbeavis
05-03-2007, 04:00 PM
I'm hosted at HostRocket here is an example if you type:
http://www.hostrocket.com/images/
You can see all the files, if I want to hide this can I do this another way other then putting in a blank index file?
SnakEyez
05-03-2007, 09:52 PM
That is a different example. The first examples I gave would do the following:
If the user types domain.com/folder:
The first example would allow you to change the name of the index file.
The second example would redirect the user to another page.
This would prevent people from using the generic directory index.
In addition, if you wanted to just hide the directory contents, but not redirect the user to a live page you could show a blank directory page by hiding the contents of the directory using the part of the tutorial located at:
http://www.javascriptkit.com/howto/htaccess11.shtml
No matter what you will have to make this htaccess file in order to solve your problem because this is the file that controls what shows up when you go to access a directory in your site.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.