Subject: Clean URL's + URL Rewrite

Posted on: 06/07/04 07:59pm
By: RickW

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" ?

Clean URL's + URL Rewrite

Posted on: 07/10/06 05:18pm
By: DarQik

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 ...

.htaccess
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!

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=37282