Welcome to Geeklog, Anonymous Thursday, August 18 2022 @ 07:50 pm EDT

Geeklog Forums

Clean URL's + URL Rewrite

Status: offline


Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
I like how GeekLog can take a dynamic link and turn it into something like "site.com/article.php/20040615190844712".

I'm wondering if anybody has been able to take that a step further and turn the link into "site.com/article.php/The-Topic/The-Title-of-the-Article" ?


Status: offline


Forum User
Registered: 10/07/06
Posts: 1
This is and has been my only major complaint with Geeklog. After days of fighting with Drupal, I figured it would be easier to mod Geeklog. I would classify this as an ugly hack though (and it require updates with every patch).

My fix: Set the sid value to the ideal "TitleOfArticle" and ...

RewriteEngine On
RewriteRule ^topic/(.*) index.php?topic=$1
RewriteRule ^article/(.*) article.php?story=$1

Then a massive search and replace on php files:
article.php?story= --> article/
index.php?topic= --> topic/

My result:
http://www.site.com/index.php?topic=GeekLog becomes http://www.site.com/topic/GeekLog
http://www.site.com/article.php/20060918174323100 becomes http://www.site.com/article/sid_text

An elegant solution for this build into Geeklog 2 would be ideal!

All times are EDT. The time is now 07:50 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content