Computer Science Canada

Make a default page that's OTHER than index.html

Author:  HazySmoke)345 [ Sat Feb 17, 2007 8:58 pm ]
Post subject:  Make a default page that's OTHER than index.html

Sorry, I'm kind of new, this is my 5th post already Embarassed

Can you make a default page of a site NOT index.html? I've done some google search and they say that I could try making index.html a redirection page that links to the homepage I want, but since not all browsers redirect properly, I would like to use a different approach, if there is one.

Is this possible?

Author:  Clayton [ Sat Feb 17, 2007 10:50 pm ]
Post subject:  Re: Make a default page that's OTHER than index.html

why do you want a default page that's not called index.html? the filename of the page doesn't make any difference. to the best of my knowledge, redirecting is the only thing you could do, but since, like you said, not all browsers handle redirecting the same, this could pose a problem.

Author:  md [ Sun Feb 18, 2007 1:41 am ]
Post subject:  RE:Make a default page that\'s OTHER than index.html

the default page is actually a function of the web server, so if you can change it's configs then you could have a default page called whatever you wanted.

Why would you want to make it anything other then index.[htm|html|php|*]? Those are the standard, and sticking with standards is always a good thing.

Author:  octopi [ Sun Feb 18, 2007 10:47 am ]
Post subject:  RE:Make a default page that\'s OTHER than index.html

Why is everyone telling him not to do it?
Why don't people give him the answer?
I understand asking questions to provoke thought, but still give the guy the answer.


anyways,
make a file named .htaccess (you'll probally have to make it something like htaccess.txt then open it in notepad)

put the following in the file

code:
DirectoryIndex notindex.html


where notindex.html is the name of the file

then upload your file to your server and rename to '.htaccess' (without the qoutes)

note this will only work on apache(and similar) webservers.

Author:  HazySmoke)345 [ Mon Feb 19, 2007 8:40 pm ]
Post subject:  Re: Make a default page that's OTHER than index.html

Thank you for appreciating me, octopi.

Usually, there is a reason why I ask questions in this forum. Since you people are curious, I shall tell you. The default page of my website is index.shtml because it uses SSI scripts.

Your solution didn't solve the problem, however. Apparantly my server doesn't support it, but since you're the only one that tried, you deserve a karma point. Thanks again, octopi. Very Happy

Author:  Clayton [ Mon Feb 19, 2007 8:46 pm ]
Post subject:  Re: Make a default page that's OTHER than index.html

hmm, that's kind of interesting octopi. I didn't realize you could do such a thing. But yes, .html being the standard, my guess is that you will have trouble with this.

Author:  md [ Mon Feb 19, 2007 8:55 pm ]
Post subject:  RE:Make a default page that\'s OTHER than index.html

step 1) tell us what kind of webserver you are using
step 2) from there we can tell if what you want can be done.

Author:  Clayton [ Mon Feb 19, 2007 9:23 pm ]
Post subject:  Re: Make a default page that's OTHER than index.html

Offtopic:
step 3)???????
step 4)Profit


any servers you know off the top of your head that you could be able to do this with?

Author:  Tony [ Mon Feb 19, 2007 11:11 pm ]
Post subject:  RE:Make a default page that\'s OTHER than index.html

.htaccess is the way to go, Apache server handles it well, though some hosts choose to be difficult and disable certain functionality. Or don't have proper mods installed.

Such as you need mod_rewrite enabled for .htaccess redirects. Which are awesome! You'll find that most blogs have .com/pretty_urls/ as oppose to .com/index.php?post=123 nonsense

Author:  Amailer [ Mon Feb 19, 2007 11:15 pm ]
Post subject:  Re: Make a default page that's OTHER than index.html

If all fails, a simple HTML redirect from index.html to index.shtml would do the trick Very Happy

Author:  md [ Tue Feb 20, 2007 2:20 am ]
Post subject:  RE:Make a default page that\'s OTHER than index.html

An html redirect is actually the best solution. As it works with all web servers.

Apache, while quite common, is not universal. There are plenty of better webservers out there and very few of them respect .htaccess; lighttpd for instance.

/me kicks apache "Take that you bloated peice of crap!"


: