Hi guys,
I have a problem that I cannot explain. I created URL like this: domain.com/lang/segment_1/segment_2/segment_3 (segment_3 is a “url_title”). Also I used combination of if statements to avoid loading not existed urls (example below).
{if segment_4}{redirect="404"}{/if}
{if segment_2 != "segment_2"}{redirect="404"}{/if}
{if segment_2 == "segment_2"}
{if segment_4 == ""}
{exp:channel:entries channel="channel_name" require_entry="yes" url_title="{segment_3}" dynamic="no" limit="1" disable="categories|member_data|pagination"}
{if no_results}
{redirect="404"}
{/if}
...
{/exp:channel}
{/if}
{/if}
Everything works fine. If I add any segment_4 then I get 404 page as expected. But… If I also add segment_5 (and segment_6, segment_7 later on) then I do not get 404 page. Instead of that browser trying to load “something” and finally I get 504 page (from ClaudFlare). Interesting fact is that the problem occurs ONLY when the last segment is “utl_title”.
Question is: why I do not get 404 page when adding not existed segments? It’s really anoying me as I don’t have idea what’s wrong.
I’m using EE 3.5.16 (Strict URLs enabled).
Thanks for your help!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.