This is a discussion on Coding style and search engine spiders within the PHP Language forums, part of the PHP Programming Forums category; I like to do the following as my style. For any page to be displayed, I have three files. File ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I like to do the following as my style. For any page to be displayed, I
have three files. File one: something.php File two: somethingInclude.php File three: something Process.php File one essentially has little more than three lines withn the <?php ?> block. They are: require("somethingProcess.php"); $htmlInclude = "somethingInclude.php"); require("template.php"); template.php is all the unchanging html stuff that constitutes the look and feel of the page. It also has in its middle a line <?php require($htmlInclude); ?>, which pulls in the page specific html stuff in the content area. (It may also pull in some other files because I don't like any given file to get too big). All the processing is done in somethingProcess.php. My son tells me that by doing it this way it is inviting rejection by the search engine spiders. I don't see why since all those spiders see is the generated html code, which has all the meta-tags in it. Am I right or is he? If he is correct , I can always modify the template.php to only include the body portion and keep everything else outside in the something.php file (meta tags, scripts, etc.) So, is he right or am I? |
|
|||
|
>all those spiders see is the generated html code
Correct. Technically, you could have a hundred include files in one script, one for each word. All the search engine spider is going to see is the gererated output of that script. |
|
|||
|
..oO(Shelly)
>I like to do the following as my style. For any page to be displayed, I >have three files. >[...] > >All the processing is done in somethingProcess.php. > >My son tells me that by doing it this way it is inviting rejection by the >search engine spiders. Nope. >I don't see why since all those spiders see is the >generated html code Correct. >which has all the meta-tags in it. Am I right or is >he? You're right. The search engine doesn't see anything different than a normal browser, in fact it's just another kind of user agent. And no user agent can tell just from looking at the received content how it was created or generated. Micha |
|
|||
|
Things get a bit more complicated of course when you start generating
the output of the script depending on a query string URL (such as www.example.com?topic=maths&subtopic=pi ) as some search engine spiders do not follow anything after a "?" char. This could stop you dynamic page being generated/read by the spider. However, in recent times, since LOTS of web pages are dynimically generated in this way, spiders have got better at this kind of thing and can follow some complex URL links. Still provides a problem though... Regards, Paul |