How to return 404 on links like shop.com/collection_name/blabla_unexisting_navigation/ ?

Shopify Partner
1 0 0

Hello, i have a problem with 404.

Collection have navigation menu with 3 links, so i want to return 404 code, when url contains link which does not exist. 

For example:

/collection-name/existing-link/ - code 200

/collection-name/basf20312_asdas210 - code 404

How to do this?

Thank you!

0 Likes