i have this simple pagination script in PHP, it worx well, but when i tried to put up this lil piece of code with my already running fancy URL (mod-reqrite) it just din work..
Look at the code
[PHP]
$num_pages=(int)$totalrows/$limit;
for($s=1;$s<=$num_pages;$s++){
if($s==$page){
echo $s." ";
}
else
{ echo"<a href='http://domain.com/learn/view/$ID/$s'>$s</a>";
}
}
if($totalrows%$limit!=0){
if($s==$page){
echo $s." ";
}
else{
echo"<a href='http://domain.com/learn/view/$ID/$s'>$s</a>";
}
}
[/PHP]
and in the .htaccess i have got this line
Expand|Select|Wrap|Line Numbers
- RewriteRule ^learn/(.*)/(.*)/(.*)$ learn.php?action=$1&id=$2&page=$3 [NC]
basically i have three parameters in query string,
action
ID
page
using mod-rewrite will force the page to be same as ID, why is it so ?
please help me
thanks and regards
Realin !