barbs75 Posted February 4, 2008 Share Posted February 4, 2008 Hey guys, This is a REAL simple question, regarding a homepage for a site? I ahve googled this issue as well and can never seem to find any useful information.... Basically, am i right in saying that your homepage has to be index.html?? or can it be say index.php? or index.shtml for example?? The only reason being, is i have includes called topContent.html and bottomContent.html which i include on my webpages using a php include script, and i want to be able to do this on my index page, the default page that is open when you type in the URL for the website. Im pretty sure there is a way of changing the page from index.html, but what is the practice for this? is it a coding issue or a server or hosting setting?? If you could help me out that would be great Cheers guys Craig (Barbs75) Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/ Share on other sites More sharing options...
Dada78 Posted February 4, 2008 Share Posted February 4, 2008 You can use any extension for your index I.E. php, shtml, asp, html, etc. If you are going to use php includes for your header and footer content on your index page then the content you are calling needs to be php as well. It is best on index pages to use straight content as it helps spiders crawl and index your page. It is having to crawl a page with links for other content it you won't get high index rankings. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-457588 Share on other sites More sharing options...
barbs75 Posted February 4, 2008 Author Share Posted February 4, 2008 ok cool, So would you advise that i just add my header and footers as normal code on the index page, not includes?? cheers Craig barbs75 Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-457625 Share on other sites More sharing options...
TheFilmGod Posted February 4, 2008 Share Posted February 4, 2008 You can use any extension for your index I.E. php, shtml, asp, html, etc. If you are going to use php includes for your header and footer content on your index page then the content you are calling needs to be php as well. It is best on index pages to use straight content as it helps spiders crawl and index your page. It is having to crawl a page with links for other content it you won't get high index rankings. absolutely incorrect. Php pages are parsed by the php server and then sent as plain html. Spiders like google don't need to crawl "extra links." You have to change the .htaccess file to change the default names. (I believe so). So you can use any page name you want. You can use "homepage.asp" or "default.php". In the .htaccess you need to create a hiarchy - which extension takes priority and which name is looked for - which is usually "index". Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-457790 Share on other sites More sharing options...
Dada78 Posted February 5, 2008 Share Posted February 5, 2008 It is absolutely correct what I said. Spiders don't crawl include pages thus making them incomplete when they are indexed. Yes on your index page just make it straight content. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-458693 Share on other sites More sharing options...
GameYin Posted February 5, 2008 Share Posted February 5, 2008 You don't have to have a specific "index" page, for a long time I used www.example.com/home.php. I try to only use includes that is processing PHP through cookies and sessions throughout my website. Using includes just to include simple HTML code is unneccesary and downright stupid. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-458733 Share on other sites More sharing options...
haku Posted February 5, 2008 Share Posted February 5, 2008 It is absolutely correct what I said. Spiders don't crawl include pages thus making them incomplete when they are indexed. What are you talking about? The include is performed on the server, then sent to the spider. The spider won't even know if its an include or not. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-458827 Share on other sites More sharing options...
TheFilmGod Posted February 5, 2008 Share Posted February 5, 2008 It is absolutely correct what I said. Spiders don't crawl include pages thus making them incomplete when they are indexed. Yes on your index page just make it straight content. Dude, you might need to read some books and grasp a basic understanding what php is. It isn't like frames/javascript i-frames where you need to make multiple requests to grab more than one file at a time. Instead the server does all the work and sends it all out in one request. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-458909 Share on other sites More sharing options...
GameYin Posted February 5, 2008 Share Posted February 5, 2008 Spiders will read the parsed PHP code (HTML code aka) and then use that code to determine the PR. Quote Link to comment https://forums.phpfreaks.com/topic/89349-homepage-does-it-have-to-be-indexhtml/#findComment-459187 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.