PHPDug URL rewrite

Hello,

I have installed PHPDug social media Digg clone and need the URL to be written so that the story title is the name of the file.

http://www.recharged.org/story.php?id=297 to
http://www.recharged.org/Sauna-championship-leaves-Russian-dead-and-Finn-in-hospital/

The variable is called “story_title”. Any ideas … or do I have to add some PHP also to the story.php?

Thanks for any advice

I have enabled SEO url’s and have .htaccess with

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

see http://www.recharged.org

Which results in every category outputting the same stories. What do you suggest?

DF.

Of course I can forget the capital letters since this will make it a little easier.

DF,

First, WELCOME to SitePoint’s Apache forum.

Second, I cover this in my signature’s tutorial. Have a look as sample code is also provided.

As an aside, have a look at http://wilderness-wally.com/ as I created that site to use mod_rewrite to fetch the correct “article” based on the URI requested. Its merely a matter of fetching the article from the db based on the title rather than the id.

Regards,

DK

DF,

Sure! Read the tutorial. It suggests that you modify the $_GET values returned (convert the _'s back to spaces) and alter the query to search for UNIQUE title values rather than id’s. That said, that’s how I did it (from scratch) and, presumably, your CMS has a similar feature which can simply be implemented by a switch in your configuration.

I have no idea how PHPDug is implemented but WP does have that feature.

Regards,

DK