Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:01 am EST

Geeklog Forums

Clean URL's + URL Rewrite


Status: offline

RickW

Forum User
Full Member
Registered: 01/28/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: 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 ...

.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 EST. The time is now 06:01 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