0

That title sounds confusing, sorry.

But basically I have a category grid page, with pagination.

So I have pages like:

/men/tops/shirts.html
/men/tops/shirts.html?p=2
/men/tops/shirts.html?p=3

This is all fine and good, but if I do this:

/men/tops/shirts.html?p=987654

That URL will load the last available page of products. How do I instead make this return a 404 error?

Basically I need to do this for Infinite Scroll's sake. Otherwise my infinite scroll keeps loading the last page of products and never ends.

1

If you are using a custom controller, you can add

$this->_forward('noRoute')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.