Re: PHP includes structure

by "Gary Krockover" <gary(at)garykrockover.com>

 Date:  Sat, 4 Jan 2003 07:50:26 -0600
 To:  <hwg-techniques(at)hwg.org>
 References:  commoveo
  todo: View Thread, Original
Actually, Google and many of the other SE's are now indexing dynamically
generated sites, up to a limited depth albeit:

http://www.google.com/webmasters/2.html

GK




> Mike,
>
>  I understand what you are saying because this is the same way I
> construct some of my pages. The question I was asking was concerning the
> practice of having a URL that looks like this
>
> www.somedomain.com/index.php?mod=news&method=show_news
>
> The last time I looked, this doc would fall on deaf ears when a spider
> came to visit due to the ? in the URL. It would not be indexed no matter
> how many meta tags were in the headers. How do you build a site using
> these methods and still get good ranking in the engines?
>
> TP
>
>
> On Mon, 2002-12-30 at 20:54, Michael Kear wrote:
> > The search engines don't see the PHP structure. They see the rendered
> > page.  Remember that PHP is a server technology, and the search engine
> > spiders simulate a user with a browser.
> >
> >
> > What I do is set up for each page a variable that contains the title,
> > and one for each meta tag if that's relevant.  Then use includes for the
> > heading and navbar and footer parts of the page.   I do it in Coldfusion
> > but the principle's the same in any technology.  Doing it this way makes
> > certain I never end up with a page with "Put your page title here" as
> > the page title.  Usually I'll also add a loop in the header.cfm so that
> > if I forget to put a title in (or the other variables) it'll add a
> > default one, so that the pages are always coherent and consistent, even
> > if I'm forgetful.
> >
> >
> >
> >
> >
> > Here's how a page starts for me on most of my sites:
> >
> > ======================START===================
> >
> > <.cfset title="Ralph Stanley - living legend">
> > <.cfset keywords="Stanley,Ralph,Legend,bluegrass,banjo,O brother,DTFM
> > .....etc">
> > <.cfset description="Ralph Stanley - after 50 years has finally reached
> > recognition in his own right as a major artist in bluegrass .... etc ">
> >
> >
> > <.cfinclude template="includes/header.cfm">
> > <.cfinclude template="includes/navbar.cfm">
> >
> >
> > Content goes in here ........
> >
> >
> > <.cfinclude template="includes/footer.cfm">
> >
> > ======================FINISH===================
> >
> >
> > The Header.cfm template includes something like this (simplified here
> > for clarity):
> >
> > ======================START===================
> > <.html>
> > <.head>
> > <.!-- #description# -->
> > <.meta name="description" content="#description#">
> > <.meta name="keywords" content="#keywords#">
> > <.META NAME="author" CONTENT="Michael Kear,  AFP Webworks, Windsor, NSW,
> > Australia  info(at)afpwebworks.com   www.afpwebworks.com">
> > <.title>#title#<./title>
> > <.link rel="stylesheet" href="styles/stylesheet.css">
> > <./head>
> > <.Body>
> > [heading bar, logo etc goes in here]
> > ======================FINISH===================
> >
> >
> > This way the entire site has only one (or in come cases two) headers,
> > footers, navbars, and I can change the whole site simply by modifying
> > these include files.   This also includes reskinning the site, since the
> > header file also brings in the style sheet, and sets up the whole look
> > and feel of the site.
> >
> >
> > It also enables the content to be held in a database for totally dynamic
> > sites, and to interface with editorial content management systems etc.
> > In theory it would be possible to build a whole site with only one html
> > page (but in practice about 5-10 html pages).
> >
> >
> >
> > Cheers,
> > Michael Kear
> > Windsor, NSW, Australia
> > AFP Webworks.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA