We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Disallow segments that don't exist

How Do I?

mr_ripley's avatar
mr_ripley
45 posts
7 years ago
mr_ripley's avatar mr_ripley

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.

       
Derek Jones's avatar
Derek Jones
7,561 posts
7 years ago
Derek Jones's avatar Derek Jones

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

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.