Hello. I have a demo site and am adding some better logic for 404s than the default. Here is my code:
{exp:channel:entries
channel="pages"
status="open"
disable="categories|category_fields|member_data|pagination"
require_entry="yes"}
{if no_results OR segment_3!=""}
{redirect="404"}
{/if}
<h3>{title}</h3>
<p> <hr > </p>
<p> {pg-main}</p>
<p> {/exp:channel:entries}This code works fine until I get to segment_3 when segments 1 is legit ... instead of redirecting I get an empty template. For example:
http://demo.tunnel7.com/our-work/awards/asdf
Now, if segment_1 isn’t legit, then it redirects fine:
http://demo.tunnel7.com/our-workasdf/awards/asdf
So I’m a bit stumped at the moment on this one. What I want to have happen is in every scenario if segment_3 exists to redirect.
I am running EE2.5.3 and am also using the Structure module.
Thanks in advance.