PHPdug mod rewrite issue

Hi, I installed phpdug script here - http://www.indexatarim.info/
and, i’m using htaccess to rewrite urls

RewriteEngine on
RewriteBase /

RewriteRule ^stories/([0-9])/(.).html$ story.php?id=$1
RewriteRule ^viewall/([0-9]).html$ index.php?page=$1
RewriteRule ^view/([0-9]
)/(.)/([0-9]).html$ cat.php?i=$1&page=$3
RewriteRule ^upcoming/([0-9])/(.)/([0-9]).html$ upcoming.php?i=$1&page=$3
RewriteRule ^users/([0-9]
)/(.)/([0-9]).html$ profile.php?id=$1&page=$3

but looks like it’s working for categories with 2 words, but not 1.

Do you know what I need to fix there?

xxx,

Fix #1. Learn some regex. Your regular expressions leave a lot to be desired, i.e., stories//xhtml should not result in story.php?id=.

Fix #2. Learn something about mod_rewrite, i.e., using Last flags will prevent the automatic AND between statements.

Fix #3. Learn something about URI syntax (Uniform Resource Identifiers (URI): Generic Syntax) as you DON’T want spaces in a URI (they appear as %20).

Fix #4. Learn even more about mod_rewrite (because RewriteBase is designed to UNDO a mod_alias redirection before using mod_rewrite - it’s not to be used indiscriminately as you’ve done).

Regards

DK