开发者

wrong paging link redirection

I have applied the class of pagination in the search result to page search-result.php. When i click on the number link of pages like 2 in 1 2 3 4 5 ... 10 then it redirects me to index.php?page=2. But the search paging result is shown on search-result.php page. The link should be search-result.php?page=2

This page (search-result.php) is also being 开发者_开发百科used for url rewriting. rule is something like:

RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ search-result.php?t=$1&slug=$2 [L] RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ search-result.php?t=$1&slug=$2 [L]

Please help me about this issue. Thanks


It seems that the "pagination" class by default redirects to an "index" page. I think it might help changing $link_prefix variable (on line 29 in the class file) from:

$link_prefix = '/?page=';

to

$link_prefix = '/search-result.php?page=';

You might either change this directly in the class or since this is a public variable, you might change it using "pagination" object.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜