RE: PHP includes structure
by ThinKer <thinker(at)thoughtprogress.com>
|
Date: |
04 Jan 2003 07:49:54 -0500 |
To: |
mkear(at)afpwebworks.com |
Cc: |
hwg-techniques(at)hwg.org |
References: |
|
|
todo: View
Thread,
Original
|
|
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.
>
>
>
>
>
>
>
> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
> On Behalf Of ThinKer
> Sent: Tuesday, 31 December 2002 10:41 AM
> To: hwg-techniques(at)hwg.org
> Subject: Re: PHP includes structure
>
> What do you do about Search Engine Optimization with all those ?
>
>
>
> On Mon, 2002-12-30 at 15:51, Kevin Waterson wrote:
> > This one time, at band camp,
> > "Davies, Elizabeth H." <EHDavies(at)West.com> wrote:
> >
> >
> >
> > > Splitting a site into it's objects allows for greater speed, easier
> troubleshooting, and all around ease of change.
> >
> > This is quite true, but can still be done with the use of a single
> page
> > to call various modules. We like to keep our code and html seperate.
> > So we use templates to do this, We can have a single page called
> > index.php and from there call various modules in the fashion of
> > index.php?mod=news to call the news module, then to call the show_news
> > method we simply call index.php?mod=news&method=show_news
> > The various modules written in eg PHP use the template as its
> > display base.
> >
> > This allows us to keep style and content seperated and keeps the site
> > modular, so it is trivial to add or remove modules. This also keeps
> the
> > web designers happy as they have full control over the look/feel of
> the
> > site.
> >
> > Kind regards
> > Kevin
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA