Click to See Complete Forum and Search --> : Using index.html AND default.html


Duke Will
05-23-2006, 08:37 AM
I have an intro.html page which leads to the main home page, index.html. I want to leave it alone but create something like intro2.html page, leading to default.html. Any problem with that? If someone typed www.mysite.com into their browser, what page would show?

Charles
05-23-2006, 08:47 AM
Well, there's one way to find out.

That behavior is defined by the server and you might be able to tinker with it.

Chalk4Brains
05-23-2006, 09:51 AM
Index Page
If someone typed www.mysite.com into their browser, what page would show?Well, as the post above states, the page that loads when entering in a website address (and not any specific file, like www.mysite.com/myfile.htm) is determined by the web server being accessed. When entering a URL such as this, the web server will return a default index page. In almost all cases the web server would search for a file named index.html or index.htm and load it in the browser of the person trying to access the site. If the web server is capable of server-side scripting then the web server would search for other page extensions, like, index.php or index.asp and load them into the browser.

Now, it is possible to modify the page that is loaded by default (the index page described above), however, you need sufficient access granted by your website hosting provider in order to do so. If you are using a free hosting website you can almost certainly rule out having the kind of access needed to do this. There are several options you can take from here:


If you have access to some sort of control panel, like cPanel, you should have access to the file that controls the default page. In this case, contact me and I should be able to help you edit the file that controls the default loading page.
You could contact your website host asking if it is possible to change the default page.
OR
You could setup a re-direct that allows you to enter in a URL to a page on your website and re-direct to another page when this page is accessed. For example, if I setup a re-direct on a page named myPage.htm that re-directs to thisPage.htm, each time a user visits www.mysite.com/myPage.htm they will automatically be taken to www.mysite.com/thisPage.htm instead. Although, re-directs are usually, again, only accessible on web servers with sufficient priveleges. You could contact your website host asking if this is possible.

I hope this has helped you out in some way. Contact me, or anyone else at Webdeveloper, if you need more help.

kenkam
05-24-2006, 10:19 PM
Is it hosted on an apache server? If it is, stick this into your public_html folder.

Name it .htaccess

DirectoryIndex your-file.html

rename your-file.html to anything you like.