We use facet filters to create collections of content. The facet filters create url arguments that look like this

www.example.com/l/language or www.example.com/l/language/g/gender

For SEO reasons we want to redirect any views page that doesn't return a result to a proper 404 page. All the solutions we've tried so far block the entire url, or they block the results. To work around this we tried using the contextual filter fix. It returned proper a 404 pages but also blocked our category content. We tried a few variations of contextual filter solutions and none worked. Our next attempt was some custom code View's path prevents 404 page from showing...

Our last attempt was to use the views 404 module, it returns a page with no results.

Is there another way to serve the content without using facet filter(URL arguments)? On the other hand is there a way to serve proper 404 pages without overriding our views results?

  • I didn't understand completely, you want when when contextual filter views have not any result show 404 with result?
    – Yuseferi
    Aug 3 '15 at 20:05
  • Yes when they have no results it should go to a 404 page. We also want to redirect non existant urls like /l/language/blah-bla to go to a 404 page. Right now a page like this will still show /l/language results.
    – Justin
    Aug 5 '15 at 18:56

Your Answer

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

Browse other questions tagged or ask your own question.