Gossamer Forum
Home : General : Internet Technologies :

Simple & Elegant URL like Wikis

Quote Reply
Simple & Elegant URL like Wikis
Typically in Wiki's if your are searching for say 'Perl' the URL that comes after search results is very simple and elegant -

http://en.wikipedia.org/wiki/Perl and similarly for PHP it would be http://en.wikipedia.org/wiki/PHP


If this was to be implemented using GT product say DBMan flatfile or SQL the URL would be -

http://www.mysite.com/...opics&Title=Perl

I would like to know if it is possible to have a simpler URL for results like

http://www.mysite.com/Topics/Perl

Can the above be achieved -

1. Writing some sort of front end like the Wiki one using PHP? Or is it possible to do it in PERL? Perl would be definitely preferable.

2. Can this be done using static Pages.

I would appreciate if someone can help in achieving this. Also I would like to know how does Wiki implement this.
Quote Reply
Re: [TIF] Simple & Elegant URL like Wikis In reply to
Hi,

The easiest way to do this is with mod_rewrite for Apache. i.e. you could use:

RewriteRule /wiki/(.*) /cgi-bin/db/db.cgi?db=Topics&Title=$1 [L]

which would make:

/wiki/Perl

go to:

/cgi-bin/db/db.cgi?db=Topics&Title=Perl

internally (end user would never see the second URL).

Hope that helps,

Alex
--
Gossamer Threads Inc.