ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

need help in URL

October 18, 2011 2:26pm

Subscribe [4]
  • #1 / Oct 18, 2011 2:26pm

    farrukhny

    42 posts

    hi guys i need help i have page lets say http://www.domain.com/tutorials  and on this wheb sita i have list of articles and when i go like this http://www.domain.com/tutorials/phrases/ but there is no /phrases/ template it is not go to 404 page how can i fix it what can i do it

  • #2 / Oct 19, 2011 6:42am

    Un.titled

    34 posts

    Hi,

    Create a template for your 404 page. Then go to Design > Global Template Preferences, there is a drop down called 404. Just select your template.

    Dave

  • #3 / Oct 19, 2011 9:24am

    farrukhny

    42 posts

    i have already 404 template and it is work when i go to wrong entry page but when go to after template group it dose not work any idea

  • #4 / Oct 19, 2011 11:27am

    Mark Bowen

    12637 posts

    Hi farrukhny,

    If you add in the require_entry=“yes” parameter to your Channel Entries Tag and then use the {if no_results} conditional in tandem with the {redirect="404"} tag like this :

    {exp:channel:entries
     channel="default_site"
     dynamic="yes"
     require_entry="yes"
     disable="member_data|trackbacks|categories|category_fields|pagination"}
    
    {if no_results}
    {redirect="404"}
    {/if}
    
    {title}
    
    {/exp:channel:entries}

    That should hopefully take care of this for you.

    Does that help at all.

    Thanks,

    Mark

     

  • #5 / Oct 19, 2011 11:37am

    farrukhny

    42 posts

    ok here is my situation

    http://www.domain.com/template_group/ is it is wrong URL it take to 404 it is GOOD

    http://www.domain.com/template_group/template  if this “template” go wrong URL any word dose not matter it shows still http://www.domain.com/template_group/ page it is my problem - NOT GOOD

    but when i go http://www.domain.com/template_group/template/entry  and it is go wrong URl it take to 404 page it is GOOD


    so how can i make that if wrong URL on this page go to 404 page http://www.domain.com/template_group/template

  • #6 / Oct 19, 2011 2:54pm

    Robin Sowell

    13255 posts

    Sounds like you have ‘Strict URLS’ enabled, thus requiring the template group in the url.  The docs on that setting give you a bit more info on how that works- so try making sure the template group’s index won’t be loaded when the template is missing by adding this bit to the index template:

    {if segment_2 != ''}   {redirect="404"} {/if}

    That do the trick for you?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases