I'm having problems with a template sending a missing page to another segment rather than the 404 page. For example, The URL below would give us our Disney Ship.
WEBSITE/cruises/disney/ships/disneyship/
What happens if someone types this?
WEBSITE/cruises/disney/ships/disneyshipTHISSHOULDNOTBEHERE/
It should 404 correct? Instead, it keeps the URL above in the browser but displays the contents of segment 2.
I've been testing all over the place and slimmed down the code for testing to just this:
{exp:channel:entries channel="at_cruise_ships" require_entry="yes"}
{if no_results}
{redirect="404"}
{/if}
<h2>{title}</h2>
{body}
{/exp:channel:entries}
NOTES:
- this works great if i do the same scenario in segment 2. For example, http://www.example.com/cruises/disneyTEST/ will redirect to the 404 page as expected
- the disney ship exists in the cruise_ships channel
- strict URLs is enabled in preferences
- my 404 template is assigned in preferences
- I am using Structure, but not directly related to this page
Please let me know if you have any suggestions on this as i'm at a loss. Thanks!