.htaccess = RewriteRule ^news([0-9]+)-([a-zA-Z0-9-]+).html$ news.php?readmore=$1 β ρεξ replaces("news\.php\?readmore=([0-9]+)(#comments)?", "news(\'$1\')", "e"); function news ($id, $comments = "") { $result = dbquery("SELECT news_subject FROM " . DB_NEWS . " WHERE news_id = ".$id); $title = editurl(dbresult($result, 0)); return 'news'.$id.'-'.$title .$comments.'.html'; }