Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Do I have to name the homepage of a site index.html?
Old 11-21-2006, 05:11 AM Do I have to name the homepage of a site index.html?
Mohab's Avatar
Ultra Talker

Posts: 256
Name: Mohab
Location: Cairo, Egypt
Trades: 0
I'm currently using Dreamweaer 8 and have specified the site's homepage. For the homepage to open when a user types in the site's url, does the homepage have to be called index.html?


What I mean is: when I type www.yahoo.com, does the page that comes up have to be index.html?
Mohab is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-21-2006, 08:11 AM Re: Do I have to name the homepage of a site index.html?
moondog's Avatar
Ultra Talker

Posts: 256
Location: Croatia
Trades: 0
index or default with extension htm,html,asp,php.......
moondog is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 08:16 AM Re: Do I have to name the homepage of a site index.html?
Mohab's Avatar
Ultra Talker

Posts: 256
Name: Mohab
Location: Cairo, Egypt
Trades: 0
Even if I've to Dreamweaver which page is going to be the home page, do I still need to rename?
Mohab is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 09:53 AM Re: Do I have to name the homepage of a site index.html?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Actually, no, you don't. You can make your site's home page anything you want -- BUT, unless you can get your hosting company to change the default page in the server setup, you're going to be stuck with the usual choices, which Moondog mentioned.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 01:44 PM Re: Do I have to name the homepage of a site index.html?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
The question is other than the extension, why would you want to rename the page?

index.asp or index.html or index.php should be fine?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 11-21-2006, 04:02 PM Re: Do I have to name the homepage of a site index.html?
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
You can always make your index page automatically redirect to another page, but you'll really annoy users that try to use the back button and automatically get put right back on your page; man I hate those.
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 04:45 PM Re: Do I have to name the homepage of a site index.html?
Experienced Talker

Posts: 37
Trades: 0
You can also have home.html etc...
gaz545 is offline
Reply With Quote
View Public Profile
 
Old 11-21-2006, 07:09 PM Re: Do I have to name the homepage of a site index.html?
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
like many people have pointed out your homepage can be whatever page you want if you have control of the hosting server. Chances are your hosting company is not going to change their default page to dustin.html just for you.... But there is no real reason why you wouldn't want the homepage to be named index.html... Usually the user does not see the index.html anyway like your example of www.yahoo.com what you see there is actually the index.html but you don't see that extention.. if you typed www.yahoo.com/index.html you would see the same site (minus some random images)
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
Old 11-22-2006, 04:00 AM Re: Do I have to name the homepage of a site index.html?
Mohab's Avatar
Ultra Talker

Posts: 256
Name: Mohab
Location: Cairo, Egypt
Trades: 0
As I'm new to webdesign and am designing a website, I named the homepage homepage.html. After reading your responses, I rensamed it to index.html in Dreamweaver which corrected all the links to and from that page.

Thank you!
Mohab is offline
Reply With Quote
View Public Profile
 
Old 11-22-2006, 12:23 PM Re: Do I have to name the homepage of a site index.html?
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
You can actually work around it using PHP, instead of redirect. Your host will have to support PHP (at least version 3).

PHP Code:
<?php
  
// True homepage file
    
$trueHome "http://www.yourdomain.com/home.htm";
  
  
// Load here
    
if (file_exists($trueHome)) {
      include(
$trueHome); }
    else {
      echo 
"<h1>Page Cannot Be Displayed</h1>\n<p>You have tried to access a page that does not exist on this server.</p>"; }
?>
Save this as index.php

Change the value in trueHome (the web address) to the page and extension you want to use for your home page. It will check to see if the file exists in the event that it does, then it will load it (display it). Otherwise, it will produce a can not be displayed error. There is HTML markup and \n. The markup is automatically parsed and displayed as it should. The \n simply means new line.

Really, there isn't any point but it helps if you want to go down a more advanced PHP route.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.

Last edited by Mooofasa; 12-03-2006 at 08:13 AM..
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 11-22-2006, 01:01 PM Re: Do I have to name the homepage of a site index.html?
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
Quote:
Originally Posted by Mohab View Post
I'm currently using Dreamweaer 8 and have specified the site's homepage. For the homepage to open when a user types in the site's url, does the homepage have to be called index.html?


What I mean is: when I type www.yahoo.com, does the page that comes up have to be index.html?

Yes - donest have to be but much less complicated if its called index.html, index.htm, index.php, index.asp - or one of those!
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
Old 11-22-2006, 01:11 PM Re: Do I have to name the homepage of a site index.html?
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Quote:
Originally Posted by coldturkey View Post
Yes - donest have to be but much less complicated if its called index.html, index.htm, index.php, index.asp - or one of those!
If you edit the httpd.conf (Apache) to allow random.thing as a home file and extension, then it will do it. Only problem with .php or .asp is that not many free hosts support it (and some paid don't either).

I suppose the .xhtml extension would also work.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.

Last edited by Mooofasa; 11-22-2006 at 01:12 PM..
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 11-27-2006, 05:24 PM Re: Do I have to name the homepage of a site index.html?
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
Sweet I learn something new everyday! that's a cool work around Mooofasa!

Quote:
Originally Posted by Mooofasa View Post
You can actually work around it using PHP, instead of redirect. Your host will have to support PHP (at least version 3).

PHP Code:
<?php
  
// True homepage file
    
$trueHome "http://www.yourdomain.com/home.htm";
 
  
// Load here
    
if (file_exists($trueHome))
      include(
$trueHome);
    else
      echo 
"<h1>Page Cannot Be Displayed</h1>\n<p>You have tried to access a page that does not exist on this server.</p>"
?>
Save this as index.php

Change the value in trueHome (the web address) to the page and extension you want to use for your home page. It will check to see if the file exists in the event that it does, then it will load it (display it). Otherwise, it will produce a can not be displayed error. There is HTML markup and \n. The markup is automatically parsed and displayed as it should. The \n simply means new line.

Really, there isn't any point but it helps if you want to go down a more advanced PHP route.
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
Old 11-28-2006, 02:23 AM Re: Do I have to name the homepage of a site index.html?
Skilled Talker

Posts: 64
Name: Timothy Nerbonne
Trades: 0
By far the best way to do it is to just set the index page in your .htaccess file. That way you don't waste any of the users time by redirecting them with silly php or html scripts. All you need to do is to create a file in the root of your website called ".htaccess" (or edit your current one) and add the following:

DirectoryIndex filename.html

All you need to do is to change filename.html to the name of the file you wish to be the default index page.
nerbonne is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Do I have to name the homepage of a site index.html?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.12136 seconds with 12 queries