Content Management System Outputting HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian N

    Content Management System Outputting HTML

    Hi,

    I've created a basic Content management System that i use to maintain
    my website.

    However i'm having promblems with getting the site ranked on search
    engines, presumably as it's all sourced from a MySQL Database.

    What i'd like to do is to add an option in the Admin Interface that
    would generate HTML files from the parsed PHP pages.

    I understand how to save a full page into a file using ob_get_clean,
    however this wouldn't solve the problem with the links which would
    still be (for example) news.php?ItemID =2.

    Is what i'm trying to accomplish feasable? and could anyone give me
    some advice on the best way to solve the problem.

    Cheers,

    Ian

  • Andy Jacobs

    #2
    Re: Content Management System Outputting HTML

    In article <1115466573.353 354.204930@z14g 2000cwz.googleg roups.com>,
    "Ian N" <iannorton@gmai l.com> wrote:
    [color=blue]
    > Hi,
    >
    > I've created a basic Content management System that i use to maintain
    > my website.
    >
    > However i'm having promblems with getting the site ranked on search
    > engines, presumably as it's all sourced from a MySQL Database.
    >
    > What i'd like to do is to add an option in the Admin Interface that
    > would generate HTML files from the parsed PHP pages.
    >
    > I understand how to save a full page into a file using ob_get_clean,
    > however this wouldn't solve the problem with the links which would
    > still be (for example) news.php?ItemID =2.
    >
    > Is what i'm trying to accomplish feasable? and could anyone give me
    > some advice on the best way to solve the problem.
    >
    > Cheers,
    >
    > Ian
    >[/color]

    How about using mod_rewrite to create search engine friendly URLs? I've
    done this on the advice of a search engine company that one of my
    customers uses. They have some spectacular results with some highly
    competitive phrases so I guess they know what they're talking about!

    --
    Andy Jacobs

    Intelligent Websites For Intelligent Business People

    Comment

    • Kenneth Downs

      #3
      Re: Content Management System Outputting HTML

      Ian N wrote:
      [color=blue]
      > Hi,
      >
      > I've created a basic Content management System that i use to maintain
      > my website.
      >
      > However i'm having promblems with getting the site ranked on search
      > engines, presumably as it's all sourced from a MySQL Database.
      >
      > What i'd like to do is to add an option in the Admin Interface that
      > would generate HTML files from the parsed PHP pages.
      >
      > I understand how to save a full page into a file using ob_get_clean,
      > however this wouldn't solve the problem with the links which would
      > still be (for example) news.php?ItemID =2.
      >
      > Is what i'm trying to accomplish feasable? and could anyone give me
      > some advice on the best way to solve the problem.
      >
      > Cheers,
      >
      > Ian[/color]

      You are pretty close. Instead of just using ob_get_clean to do one page,
      you want to "walk" through your site, generating a static HTML for each
      page, and converting all of links into static links. The site will be
      composed purely of static HTML, with the PHP pages only being used to
      generate the HTML at build time, not at access time.

      It is important that the file names and hyperlinks not change when you
      rebuild the site, otherwise you will confuse the search engines.

      --
      Kenneth Downs
      Secure Data Software, Inc.
      (Ken)nneth@(Sec )ure(Dat)a(.com )

      Comment

      • Ian N

        #4
        Re: Content Management System Outputting HTML

        I was hoping to maybe write some sort of function that would run
        through it for me, so that a had a 'Convert' button which would do all
        the hard work for me.

        I've had a loot at the Apache solution and it does seem to be a good
        way to go, i'm on a shared server so not sure if i'd be able to do this
        though.

        Kenneth Downs wrote:[color=blue]
        > Ian N wrote:
        >[color=green]
        > > Hi,
        > >
        > > I've created a basic Content management System that i use to[/color][/color]
        maintain[color=blue][color=green]
        > > my website.
        > >
        > > However i'm having promblems with getting the site ranked on search
        > > engines, presumably as it's all sourced from a MySQL Database.
        > >
        > > What i'd like to do is to add an option in the Admin Interface that
        > > would generate HTML files from the parsed PHP pages.
        > >
        > > I understand how to save a full page into a file using[/color][/color]
        ob_get_clean,[color=blue][color=green]
        > > however this wouldn't solve the problem with the links which would
        > > still be (for example) news.php?ItemID =2.
        > >
        > > Is what i'm trying to accomplish feasable? and could anyone give me
        > > some advice on the best way to solve the problem.
        > >
        > > Cheers,
        > >
        > > Ian[/color]
        >
        > You are pretty close. Instead of just using ob_get_clean to do one[/color]
        page,[color=blue]
        > you want to "walk" through your site, generating a static HTML for[/color]
        each[color=blue]
        > page, and converting all of links into static links. The site will[/color]
        be[color=blue]
        > composed purely of static HTML, with the PHP pages only being used to
        > generate the HTML at build time, not at access time.
        >
        > It is important that the file names and hyperlinks not change when[/color]
        you[color=blue]
        > rebuild the site, otherwise you will confuse the search engines.
        >
        > --
        > Kenneth Downs
        > Secure Data Software, Inc.
        > (Ken)nneth@(Sec )ure(Dat)a(.com )[/color]

        Comment

        • Mike Willbanks

          #5
          Re: Content Management System Outputting HTML

          Ian,[color=blue]
          > I was hoping to maybe write some sort of function that would run
          > through it for me, so that a had a 'Convert' button which would do all
          > the hard work for me.
          >
          > I've had a loot at the Apache solution and it does seem to be a good
          > way to go, i'm on a shared server so not sure if i'd be able to do this
          > though.[/color]

          Almost all shared servers have this enabled or will enable it on
          request. Primarily it is all controlled through a .htaccess file.

          How I have done this in the past was wrote my CMS to do the following:
          - deny anything with a 404 error not from mod_rewrite (no penalty for
          double content)
          - cache all database calls for 1hr or more depending on how much the
          pages updates
          - cache all the templates with the php source merged together (its a 3
          file process on mine using a custom xml document).

          Then it all runs together real quick. Search engines have scanned
          through every single page which is amazing when you have clients that
          have 100 pages!

          Mike

          Comment

          Working...