I have two taxonomy term pages with the following details:

  1. Term id : 1 , url alias : fruits
  2. Term id : 2 , url alias : fruits/apple

When I am typing url http://www.example.com/fruits/apple then content related to term id 2 is getting loaded which is correct

But the problem is when I am typing http://www.example.com/fruits/apple1 which is not a valid url then the content of Term id 1 is getting loaded since it is matching till "fruits". In such scenario I want the site to be getting redirected to a 404 page instead of matching termid of "fruits".

I need the full taxonomy url to be valid or redirect to 404.

I am using views taxonomy term page (Default one which by default remains inactive) where a wild card character is there taxonomy/terms/%.

Please help. I cant find a suitable solution for the same.

  • Are you talking about 'admin/structure/views/view/taxonomy_term/edit' view ?? Is it correct one 'taxonomy/terms/%' ??
    – Rupesh
    Feb 27, 2016 at 12:35
  • Yes I am using the view. Can you please provide a solution Feb 27, 2016 at 12:48

1 Answer 1


If you are using contextual filter, then there is validation criteria in settings of taxonomy term name you have selected. When filter value is in URL Then add filter value type as taxonomy term name and add action as page not found. Specify validation

You will get the result.

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.