Htacces and Paginator
Htacces and Paginator
Sorry for my English. I do not speak the language well.
So I use the htaccess file.
RewriteRule ^(w+)/?$ index.php?id=$1&name= [L,QSA]
RewriteRule ^(w+)/(w+)/?$ index.php?id=$1&name=$2 [L,QSA]
RewriteRule ^(w+)/?$ index.php?id=$1&page= [L,QSA]
RewriteRule ^(w+)/(w+)/?$ index.php?id=$1&page=$2 [L,QSA]
And paginator:
<?php
$count = DB::queryFirstField("SELECT COUNT(*) FROM articles");
$total_records = $count;
$total_pages = ceil($total_records / $limit);
$pagLink = "<div class='listar-pagination'>";
for ($i=1; $i<=$total_pages; $i++) {
$pagLink .= "<li><a href='all_corp/page/".$i."'>".$i."</a></li>";
};
echo $pagLink . "</div>";
?>
The paginator not working. If i open the https://gotogo.hu/all_corp/page/2, the page not loading.
What might be the problem?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.