Jump to content

[SOLVED] Pagination and modrewrite problem


acegames

Recommended Posts

I have made my urls friendly with modrewrite but I am stuck on the last part

 

My code is displaying : Download-DJ+Webstar+Feat+Jim+Jones+Dancing+On+Me-mp3-12525-/mp3.php?start=10-10.htm

 

But needs to be like this to work : Download-DJ+Webstar+Feat+Jim+Jones+Dancing+On+Me-mp3-12525-/mp3.php-10.htm

 

My htaccess :

Options +FollowSymLinks
RewriteEngine on
RewriteRule Download-(.*)-(.*)-(.*)-(.*)-(.*)\.htm$ download-url.php?filename=$1&table=$2&id=$3&page=$4?start=$5

 

My page code :

<a href="Download-<?php echo $uListName ?>-<?php echo $table ?>-<?php echo $fileID ?>-<?php echo $page ?>-<?php echo $start ?>.htm"><?php echo $ListName ?><br /></a>
<?


$i++;
}


if($numrows > ($start + 10)) {
   echo "<a href=\"" . $_SERVER[php_SELF] . "?start=" . ($start + 10) . "\">Next Page</a><br/>\n";
} else {
echo "";
}
if($start > 0) {
   echo "<a href=\"" . $_SERVER[php_SELF] . "?start=" . ($start - 10) . "\">Previous Page</a><br/>\n";
} else {
echo "";
}
echo"</p>";
?>

 

Could somebody please give me any pointers as to where I have gone wrong

 

It all works apart from when I click on next page and then the url is $start=10

 

 

Thanks for your reply

 

I have made some changes and it is all working now except on my download page I echo the $page as a back link and it is using the url in the browser for some reason with the $page variable on the end

 

This is how im trying to display it :

<div class="header"><a href="<?php echo"$page" ?>">Back</a></div>

 

But its linking to :http://www.domain.com/Download/Lady+Gaga+Paparazzi/mp3/12526/mp3-testing.php/mp3-testing.php?start=10

 

Instead of to :http://www.domain.com/mp3-testing.php?start=10

 

 

 

If I just echo the $page variable I get : mp3-testing.php?start=10

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.