D
D
Diamond2015-12-04 19:04:37
Apache HTTP Server
Diamond, 2015-12-04 19:04:37

How to setup htaccess for pagination?

There are rules by which URLs are formed, but there is something in them that makes these rules not work correctly, i.e. if the first rule works fine and the page is also displayed as expected, then problems with pagination are already starting, for some reason the value is not entered into the cstart variable, and if you comment out the first rule, then the second one works fine and the cstart variable is initialized.

RewriteRule ^allnewsgame/([0-9]+)-(.*)(/?)+$ index.php?do=allnewsgame&gameId=$1 [L]
RewriteRule ^allnewsgame/([0-9]+)-(.*)/page/([0-9]+)(/?)+$ index.php?do=allnewsgame&gameId=$1&cstart=$3 [L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Diamond, 2015-12-05
@Arios

The solution turned out to be quite simple: You need to swap the lines, i.e. move the pagination rule above the first rule.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question