Welcome to Geeklog Saturday, October 23 2021 @ 08:33 am EDT

Geeklog Forums

Clean URL's + URL Rewrite


Status: offline

RickW

Forum User
Full Member
Registered: 28/01/04
Posts: 240
Location:United States
determined
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" ?

www.antisource.com
 Quote

Status: offline

DarQik

Forum User
Newbie
Registered: 07/10/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 ...

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

All times are EDT. The time is now 08:33 am.

  • 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