Thread

Disallow segments that don't exist

November 30, 2017 4:05pm

Subscribe [2]
  • #1 / Nov 30, 2017 4:05pm

    mr_ripley

    45 posts

    What is occurring is that the template is targeting the last segment in the url, making it possible for multiple paths to exist. How do I disallow segments that don’t exist?

    For example: https://www.SITE.com/lasers/main/mephisto-lasers https://www.SITE.com/lasers/main/test/test/mephisto-lasers

    test/test does not represent anything. I need to send that to a 404 page.

  • #2 / Dec 06, 2017 9:30am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    A combination of segment conditionals and {if no_results} redirects is best practice. Please see the docs for making 404 pages.

ExpressionEngine News

#eecms, #events, #releases