Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-02-2006, 05:55 AM   #1
Member (9 bit)
 
Join Date: Nov 2002
Location: London, UK
Posts: 288
How do I make a file the home page when it isn't called home.htm or index.htm?

Hi,
probably a simple one but I don't know how to do this - I don't always want to call home pages 'index' or 'home' and I'm sure there's a way of having some other page as the home page but whatever I try when I go to the domain name it always defaults back to the home or index page or else I just get a view of my directory tree - not pretty!

I also had a related problem with a php site - where it was defaulting to the index.php page instead of the home.htm

Any help on this matter much appreciated - I'm stumped!

Regards,
Phil
Londoner is offline   Reply With Quote
Old 11-02-2006, 06:29 AM   #2
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
The easiest way is to make a redirect index.htm or index.php file that sends your visitors to your homepage.
Also, on cpanel you should see the Index Manager .. you can use it to turn off directory listings when the index.* page is missing.
Statica is offline   Reply With Quote
Old 11-02-2006, 06:52 AM   #3
Member (9 bit)
 
Join Date: Nov 2002
Location: London, UK
Posts: 288
Quote:
Originally Posted by Statica
The easiest way is to make a redirect index.htm or index.php file that sends your visitors to your homepage.
Also, on cpanel you should see the Index Manager .. you can use it to turn off directory listings when the index.* page is missing.
Thanks for posting, statica - you can probably guess my next question: Ho wdo I do that? (redirect.)
Londoner is offline   Reply With Quote
Old 11-02-2006, 07:01 AM   #4
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Create a blank file with the following code:
PHP Code:
<?php
header
'Location: http://www.yoursite.com/your_real_page.html' ) ;
?>
and save as index.php

or:
create a blank file with the following:
PHP Code:
<html>
<
head>
<
meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yoursite.com/your_real_page.html">
</
head>
</
html
and save as index.html
Statica is offline   Reply With Quote
Old 11-02-2006, 07:56 AM   #5
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
The first method is by far the best. It is recommended by search engines and it doesn't "break" the back button.
faulkner132 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Acronyms Floppyman Computer Hardware 156 06-18-2006 06:25 AM
registry?? Toolman35 Windows Legacy Support (XP and earlier) 1 06-25-2004 11:35 AM
Heres some Window Secrets Citron Windows Tips, Tricks, and Tweaks 22 01-12-2003 07:07 AM
Trouble with backup.bat program JTH Software Discussion & Support 2 12-04-2002 03:35 PM
Partitioning with Unattended Installation (XP Pro) catch23 Windows Legacy Support (XP and earlier) 6 10-01-2002 12:16 AM


All times are GMT -5. The time now is 05:14 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2