geeklog directory geeklog directory
 Geeklog Directory - Rewriting Geeklog Articles with Mod_Rewrite and a few edits. Sunday, May 11 2008 @ 11:28 PM EDT  
Directory Category
  • GeekLog Directory
  • Arts
  • Books/Literature
  • Business
  • Children
  • Commercial
  • Community
  • Computers
  • Directory Top 50
  • Education
  • Food and Drink
  • Gardening
  • Geeklog Tech Related
  • Health/Medical
  • Humour
  • Media
  • Music
  • Nature
  • Personal
  • Politics
  • Science/Technology
  • Society
  • Sport
  • Travel
  • Women

  • Add Your GeekLog Site


  • About GLDIR
    GeekLog DIRectory consists of only websites and weblogs that have been published with a Geeklog content management system.

    It shows the dynamic power and flexibility that geeklog provides and this enables webmasters and site builders to publish a wide variety of websites and weblogs.

    Geeklog Publishers can


    ADD YOUR GEEKLOG SITE HERE.


    Linking back would be preferred but not essential.

    GL Mod


    User Functions
    Username:

    Password:

    Don't have an account yet? Sign up as a New User


    Rewriting Geeklog Articles with Mod_Rewrite and a few edits.   
    Friday, August 27 2004 @ 06:20 PM EDT

    The age old problem with Geeklog has always been to get your geeklog articles indexed and indexed well in search engines, particularly google.


    The crux of the problem always lay with the long digit unix timestamp being included in a dynamic url format. (ie with a question mark). Google will index properly stuff like "index.php?topic=yourtopic", but the long digit timestamp in conjunction with "article.php?story=" has always been treated with suspicion by gbot. Although these urls now do get crawled and indexed they never have green in the google toolbar, and never figure as well as an article that is rewritten with googles rules in mind.

    I have sought to find the easiest ways to rewrite the articles in a way that google does like. You will see i rewrite articles in the format /unixtimestamp.htm. Google likes the format, gbot believes the url represents a static .htm document, and in time, gives it green in the tool bar. This means that google thinks highly of the article and is likely to follow with authority any links within the htm doc it is reading.

    When it comes down to it, its very easy to rewrite geeklog articles into .htm (can be any extension, ie .html, .php etc..)

    lib-common.php
    changing '/article.php?story=' . $A['sid'] . ' into '/' . $A['sid'] . '.htm' . '
    on line 445
    on line 448
    on line 457
    on line 2935

    stats.php
    changing $stat_templates->set_var('item_url', 'article.php?story=' . $A['sid']); into $stat_templates->set_var('item_url', $A['sid'] . '.htm');
    on line 165, there are a couple of identical lines that will need editing in the same way further down stats.php.

    search.php
    changing "article.php?story=' . $A['sid'] . ' into "' . $A['sid'] . '.htm' . '
    on line 447
    Note that newer versions of GL use search.class.php in system/classes/ and the edits need to be in there instead of search.php.... ie line 301.

    users.php
    Change $_CONF['site_url'] . '/article.php?story=' . $C['sid'] . '">'); into
    $_CONF['site_url'] . '/' . $C['sid'] . '.htm' . '">');
    On line 151

    printable.thtml in your layout
    changing "{site_url}/article.php?story={story_id}">{site_url}/article.php?story={story_id} into "{site_url}/{story_id}.htm">{site_url}/{story_id}.htm
    on line 21

    rewriting in these places should eliminate all mention of "article.php?story=" and adds an extension to the articles. Please note that you could go mad and rewrite absolutly everything within geeklog, but i don't think its worth the effort, because geeklogs only big weakness as regards to google has been the unixstamp expressed as a dynamic url.

    I also added these lines to my .htaccess
    RewriteEngine on
    RewriteRule ^(.*).htm$ /article.php?story=$1 [NC,L]
    This rule makes everything work.

    There are on reflection many slight differences between various versions of geeklog and line numbers may be different as well, but as long as search for "article.php?story=" you should find all the right lines to edit.

    As of September 2004 i have created a total Mod_Rewrite Version of geeklog 1.3.9.1.
    Click Here for Mod Rewrite Geeklog  . . . . . . . . . . . . . .

     


    What's Related
  • Click Here for Mod Rewrite...
  • More by geeklogdir
  • More from Geeklog Tech Related

  • Story Options
  • Printable Story Format




  •  Copyright © 2008 Geeklog Directory
     All trademarks and copyrights on this page are owned by their respective owners.

    Powered By