1

I used widget "clinkpager". It appears on page when i click on 2nd,3rd .... page. I wont moved on next page. Even next and previous also not works there.

<?php
$this->widget('CLinkPager', array(
'pages' => $pages, 
'currentPage'=>$pages->getCurrentPage(),
'pageSize'=>$page_size,     
'itemCount'=>$count,        
'header'=>'',
 ));?>

When i click on "next" then the url changed in the browser. http://localhost/mate/admin/site/pricelisting/89-Malouf-Zoned-Gel-Dough/page/2

but it will not move on 2nd page.

instead of above URL if i use below url then it move to the page http://localhost/mate/admin/site/pricelisting/89-Malouf-Zoned-Gel-Dough?page=2

.htaccss file


        RewriteEngine on

        RewriteCond %{HTTP_HOST} ^localhost/mate/admin$ [NC,OR]
        RewriteCond %{HTTP_HOST} ^localhost/mate/admin$

        RewriteCond %{REQUEST_URI} !wordpress/
        RewriteRule (.*) /wordpress/$1 [L]

        Options +FollowSymLinks -MultiViews
        RewriteEngine On

        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* index.php/$0 [PT,L]

        RewriteRule details/(.*)/(.*)/ site/details?id=$1&name=$2
        RewriteRule details/(.*)/(.*) site/details?id=$1&name=$2

        RewriteRule pricelisting/(.*)-(.*)/ site/pricelisting?id=$1&name=$2?page=$3 [L,QSA]
        RewriteRule pricelisting/(.*)-(.*) site/pricelisting?id=$1&name=$2?page=$3 [L,QSA]

        #RewriteRule pricelisting/(.*)-(.*)/ site/pricelisting?id=$1&name=$2
        #RewriteRule pricelisting/(.*)-(.*) site/pricelisting?id=$1&name=$2

        #RewriteRule pricelisting/(.*)-(.*)/page(.*)/ site/pricelisting?page=$3 [L,QSA]
        #RewriteRule pricelisting/(.*)-(.*)/page(.*) site/pricelisting?page=$3 [L,QSA]


        RewriteRule ^pricelisting/(.*)-(.*)/page(.*)/ site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]
        RewriteRule ^pricelisting/(.*)-(.*)/page(.*) site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]

I don't have any idea. Please suggest me what is wrong there.

Abhishek Gurjar
  • 7,426
  • 10
  • 37
  • 45
Harish Mahajan
  • 3,254
  • 4
  • 27
  • 49

1 Answers1

0

I think this is due to your rewrite rules

RewriteRule ^pricelisting/(.*)-(.*)/page(.*)/ site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]
RewriteRule ^pricelisting/(.*)-(.*)/page(.*) site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]

They would reqrite [...]/page2to the according page, since there is a /missing between page and the number placeholder - if I'm not completely wrong. Change them to

RewriteRule ^pricelisting/(.*)-(.*)/page/(.*)/ site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]
RewriteRule ^pricelisting/(.*)-(.*)/page/(.*) site/pricelisting?id=$1&name=$2&page=$3 [L,QSA]

and I believe that it should work.

Paul Kertscher
  • 9,416
  • 5
  • 32
  • 57