Forum Moderators: open

Message Too Old, No Replies

index.php & index.html

         

herbacious

12:23 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



hi there - a few questions

can an index.html and an index.php reside in the same folder?

which will take priority - is there a standard or will different browser react differently? - is there any way of forcing the index.html to take priority except when index.php is specifically in the url

which will search engine spiders go for? - could they be blocked from spidereing the index.php using meta tags?

the reason i ask is that i am trying to SEoptimize a site based on intershop that uses some php code within a frameset tag for direct store entry to particular products..

i cant see a way to maintain the fucntionality of the php code (not helped by the fact i dont know the first thing about php)in a static - non framed html index file

and so thought of the idea of leaving the index.php (the one with the frameset) intact and simply putting another index.html along side it -

this would only be worth doing tho if the .html one will take priority when people and spiders go to the root domain

if someone can help me out here i will be <b> very grateful!</b>

RonPK

1:32 pm on Apr 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> can an index.html and an index.php reside in the same folder?

Sure, no problem.

>> which will take priority - is there a standard or will different browser react differently? - is there any way of forcing the index.html to take priority except when index.php is specifically in the url

It's a setting in your web server software configuration. Apache uses "DirectoryIndex" directive. It could look like this:

DirectoryIndex index.html index.php

If I'm correct, this makes index.html the default.

>> which will search engine spiders go for?

They usually follow links.

>> could they be blocked from spidereing the index.php using meta tags?

Yes, with the tag <meta name="robots" content= ..>

Filipe

2:23 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



>> which will search engine spiders go for?

If they're just following a link to the root path of your website (e.g., [widgets.com...] rather than [widgets.com...] then it's up to your server which page is served to spiders first. So if you have it set to serve index.html before index.php, then that's what spiders will see.

I would only recommend having index.php and index.html in the same directory if you're using the HTML version as a backup in case your database goes down or your PHP build goes sour. Having too similarly named files in the same directory can sometimes lead to mistyped URLs in links and cause confusion later. Not a big issue, but one I like to avoid.

herbacious

3:10 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



cheers people ;-)

much appreciated

grahamstewart

6:32 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cant see a way to maintain the fucntionality of the php code (not helped by the fact i dont know the first thing about php)in a static - non framed html index file

You don't need to. A spider will just as happily index a php page as well. It doesn't matter that the page is dynamic. With php its all handled on the server side, the user just sees html.