Forum Moderators: open

Message Too Old, No Replies

Making a link to "/directory" display "/directory/page.html"

         

grimreaper1377

1:16 am on Oct 30, 2007 (gmt 0)

10+ Year Member



Hi,

I have my website that I am currently building. I want to have different sections (games, portfolio, etc.)

Basically, I want to have it where users can go to www.example.com/games and be able to go to a specific page. Currently, it shows the directory listing. Is there a way to fix this? I even named the file index.html but it still shows the directory listing.

Thanks

HOTmike

3:00 am on Oct 30, 2007 (gmt 0)

10+ Year Member



This is a web-server issue, meaning the web server isn't configured to acknowledge "index.html" as an index page (at least for that directory).

If you are running your own web server from your home computer, try browsing through the configuration document for the list of recognised index documents, or try different permutations like "index.htm" or "index.php".
For more information, it would be helpful to know which server software package you have installed.

If you are running your site on a paid web hotel, contact support. The "index.html" filename should be recognised by default on any web server installation unless explicitly altered to exclude it.

Oh, and just a thought (for the absolute noob): be sure there isn't a hidden .txt at the end of the filename. Don't laugh. I've seen people completely dumbfounded when renaming a text file to, say, "index.html(.txt)" and it won't behave or display as a web page document.

Marshall

3:03 am on Oct 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you are on a windows server, it may be default.htm or default.html.

Marshall

Dabrowski

10:42 pm on Oct 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, IIS uses default instead of index for some reason.

It's definately a server issue, you should also disable directory browsing for security reasons, you don't want people downloading your scripts to read your database passwords!

The page should come up "403 Forbidden" I think if it's disabled and no index page.

[edited by: Dabrowski at 10:43 pm (utc) on Oct. 30, 2007]

penders

9:48 pm on Oct 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...you should also disable directory browsing for security reasons...

If you don't see an option via your hosting control panel, you can apparently disable directory listing by having the following in your .htaccess file:

Options -Indexes