That title sounds confusing, sorry.

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

So I have pages like:


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


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 Answer 1


If you are using a custom controller, you can add


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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