Im a real newbies in rewite rules.... In my htaccess RewriteEngine on #Redirect http://site.com to http://www.agentsexe.com RewriteCond %{HTTP_HOST} ^site.com RewriteRule ^(.*)$ http://www.site.com/$1 [r=301,L] RewriteRule ^page([0-9]+)\.html*$ /index.php?page=$1 [L] desired url: www.site.com/page-1.html and for my 3 different Categories desired url: www.site.com/page-1-humor.html desired url: www.site.com/page-1-trash.html desired url: www.site.com/page-1-sexy.html This is my code index.php: if($page>0) { $j=$page-1; $url="?page=$j"; $pageshtml.="<a href=\"$url&cat=$cat\"><<</a>"; } for($i=0;$i<$pages;$i++) { $url="?page=".$i; $j=$i+1; if($_GET[page]==$i){$pageshtml.=" <b>$j</b> ";}else{$pageshtml.=" <a href=\"$url&cat=$cat\">$j</a> ";} } if($page<$pages-1) { $j=$page+1; $url="?page=$j"; $pageshtml.="<a href=\"$url&cat=$cat\">>></a>"; } $pageshtml.="</center>"; PHP: this code show a defaut link: http://www.site.com/?page=1&cat= http://www.site.com/?page=1&cat=funny can i use this variable : $newouturl = str_replace(" ", "-", $row[title]); $gallery=str_replace("%outurl%","http://www.site.com/$row[id]-$newouturl.html",$gallery);
RewriteRule ^page-([0-9]+)-([a-zA-Z0-9]+).html http://www.site.com/?page=$1&cat=$2 [NC,L] that should do the trick for you hopefully
RewriteRule ^page-([0-9]+)-([a-zA-Z0-9]+).html http://www.site.com/index.php?page=$1&cat=$2 [NC,L] try that, it might not of liked the scriptname not been there.