thats nice and easy - only you need it to be like this:
http://www.m2m-lucky13.com/article/20721/ (use what ever where article is)
I tried to figure it our without the article bit but couldn't - maybe you can.
anyways - now make a file called article (a php file but with no extension) and edit it in notepad (or editor of choice)
<?php
$expl = explode("/article/",$HTTP_SERVER_VARS["REQUEST_URI"]);
$tmp = $expl[1];
$expl = explode("/",$tmp);
$catagory = $expl[0];
$article_id = $expl[1];
echo "$catagory: $article_id";
?>
In the example above, I get 2 variables, $catagory and $article_id. The link looks like this:
http://blah.com/article/php_tutorials/1834
and it goes to the php_tutorials section (so you can customize each section), article 1834 (could be a word if you wanted - but I use a db and that is the id of the article)
Then in .htaccess put this in:
<FilesMatch "article$">
ForceType application/x-httpd-php
</FilesMatch>
Thats it 🙂 Now of course you dont actually have to call it article, but I think its a good use.
The best parts of this are:
1) that users see better structure in the links and can see where they are
2) if you move files around on your site, you just change the article file and all your links are still the same (great for bookmarks)
3) search engines will index every page (they dont index pages with parameters on the end)
Have fun
- Matt