Forum
Search pagination breaking
Hey all,
I've taken over work on a Runway site and it seems the search pagination is broken, i have a feeling its a rewrite rule issue but i'm not 100% sure, the next page just links to ?page=2 instead of ?s=QUERY&page=2
my htaccess is as follows - i'm not 100% sure what's required and don't really want to break or change anything without a second opinion!!
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 month"
ExpiresDefault "access 1 week"
</IfModule>
# 1 Month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
## EXPIRES CACHING ##
# Perch Runway
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/perch
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /perch/core/runway/start.php [L]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} \s(.+?)/+[?\s]
RewriteRule ^(.+?)/$ /$1 [R=301,L]
<IfModule mod_rewrite.c>
RewriteEngine on
# rules go here
</IfModule>
#RewriteRule ^news-and-views/([a-zA-Z0-9-/]+)$ /news-and-views/post.php?s=$1 [L]
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
the form and results template are based off the default Runway ones, the showall shows
paging true
total 30
number_of_pages 3
total_pages 3
per_page 10
current_page 1
lower_bound 1
upper_bound 10
prev_url
next_url ?page=2
prev_page_number
next_page_number 2
not_last_page true
perch_item_last true
perch_item_zero_index 9
perch_item_index 10
perch_item_rev_index 1
perch_item_rev_zero_index 0
perch_item_odd odd
perch_item_count 10
perch_namespace perch:search
Any help would be appreciated!
Thanks A
Please post your Diagnostics Report. We need this with all forum posts.
If the link being generated in the HTML is incorrect, it's unlikely to be a rewrite issue at that point, is it not?
Is the output any different using the default template?
seems to be the same unfortunately
Ok. Can you show us what you've got?
sure!
https://www.lebc.ewestaging.co.uk/search.php?s=retirement
Can we see the Perch code you're using in your page and in the template?
Your install is a few versions behind, so it wouldn't hurt to update also. At least then we know what code any error messages refer to.