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.

Page won't show correct without /index

September 08, 2010 6:22am

Subscribe [3]
  • #1 / Sep 08, 2010 6:22am

    IschaGast

    56 posts

    Page:
    http://janhekmanschool.nl/nieuws/
    http://janhekmanschool.nl/nieuws/index

    When you hover the links on the left hand side you see that de news detail page is located at http://janhekmanschool.nl/nieuws/artikel/

    But on the page without index in the url that /artikel/ won’t show and I don’t know why?

    I hope someone knows why this is.

  • #2 / Sep 08, 2010 9:29am

    Sue Crocker

    26054 posts

    I suspect it’s due to whatever settings you’re using to remove index.php. Unfortunately, we don’t directly support removing index.php.

  • #3 / Sep 08, 2010 9:47am

    IschaGast

    56 posts

    That’s what I was thinking but the strange thing is that the links are different and I don’t know where they come from. I looks like there is some ghost file or something where those links are without the /artikel/ part.

    My file was first without the /artikel/ part but I added this. I thought maybe somewhere in the cache is that ghost file but I removed the cache and nothing happend.

  • #4 / Sep 08, 2010 3:29pm

    Ingmar

    29245 posts

    Are you on the latest version and build?‘Also, as Sue suggested, please try to take the server rewrite out of the picture for now, putting index.php back into your URLs, as it were. Does that work?

  • #5 / Sep 08, 2010 5:18pm

    IschaGast

    56 posts

    I can’t just put index.php back because all the links in the site don’t use it. Alle links are like this:
    {title_permalink={template_group}/artikel} and when I removed everything in de htaccess file it said “page not found”.

    It’s not that big problem because with the normal links you never get on that page only in the sitemap.

  • #6 / Sep 09, 2010 8:18am

    Sue Crocker

    26054 posts

    You just need to put index.php back in again in the

    Name of your site’s index page

  • #7 / Sep 13, 2010 9:12am

    IschaGast

    56 posts

    I emptied my htaccess file and put back the index.php at Name of your site’s index page but that didn’t solve the problem. It still doesn’t include the /artikel/ thing in the url’s on that page.

    I don’t get it :(

  • #8 / Sep 13, 2010 3:42pm

    Ingmar

    29245 posts

    I think it might be matter of your template code. Are you using conditionals, checking for segment_2 or similar? How are you linking to the entries in the side bar, can you show us the relevant parts of your code?

  • #9 / Sep 14, 2010 4:43am

    IschaGast

    56 posts

    I think it might be matter of your template code. Are you using conditionals, checking for segment_2 or similar? How are you linking to the entries in the side bar, can you show us the relevant parts of your code?

    I am checking for segment_2 etc… maybe there is something wrong, but I don’t see it at the moment.

    {exp:channel:entries channel="{template_group}" dynamic="off" limit="7" disable="pagination|trackbacks|member_data"}
        <li>
        {if segment_2=="" && count==1}
            <strong>{title} <span><span>[</span>{entry_date format="%d %F %Y"}<span>]</span></span></strong>
        {if:elseif segment_2==url_title}
            <strong>{title} <span><span>[</span>{entry_date format="%d %F %Y"}<span>]</span></span></strong>
        {if:elseif segment_3==url_title}
            <strong>{title} <span><span>[</span>{entry_date format="%d %F %Y"}<span>]</span></span></strong>
        {if:else}
            <a href="http://{title_permalink={template_group}/artikel/}">{title} <span><span>[</span>{entry_date format="%d %F %Y"}<span>]</span></span></a>
        {/if}
        </li>
    {/exp:channel:entries}
    
    
    {exp:channel:entries channel="{template_group}" dynamic="off" disable="pagination|trackbacks|member_data"}
        {date_heading display="yearly"}
        <li><a href="http://{path={template_group}/archief/{entry_date">{entry_date format="%Y"}</a></li>
        {/date_heading}
    {/exp:channel:entries}
  • #10 / Sep 14, 2010 5:24am

    Ingmar

    29245 posts

    But that’s exactly what’s happening here:

    {if segment_2=="" && count==1}

    do ... otherwise do that:

    ... a href="{title_permalink={template_group}/artikel/}"

    It’s the “else” clause that only kicks in if segment_2 is not empty, i.e. consists of “index” or similar.

  • #11 / Sep 14, 2010 5:52am

    IschaGast

    56 posts

    If I change it to the following code nothing changes :(

    <ul class="nav_news">
        {exp:channel:entries channel="{template_group}" dynamic="off" limit="7" disable="pagination|trackbacks|member_data"}
        <li>
            <a href="http://{title_permalink={template_group}/artikel/}">{title} <span><span>[</span>{entry_date format="%d %F %Y"}<span>]</span></span></a>
        </li>
        {/exp:channel:entries}
    </ul>
  • #12 / Sep 14, 2010 4:32pm

    Ingmar

    29245 posts

    I am afraid this is almost certainly an issue with your template. Please try to reduce it to a minimum, make sure it works and take it from there.

  • #13 / Sep 23, 2010 6:50pm

    IschaGast

    56 posts

    First I thought EE was getting an other template for both pages and after some testing this evening I think EE really does.

    http://janhekmanschool.nl/nieuws/
    http://janhekmanschool.nl/nieuws/index

    To test it I placed some text just after the body to see what template EE used for both pages.
    Only on this url the text is visible: http://janhekmanschool.nl/nieuws/index

    Looks strange to me…

  • #14 / Sep 24, 2010 11:24am

    Ingmar

    29245 posts

    The templates looks identical to me. I am afraid there really seems to be an issue in your template that you need to address. My suggestion would be to start out with a minimal template, make sure it works identically with and without the “index” in segment 2, then take it from there.

  • #15 / Sep 24, 2010 11:33am

    IschaGast

    56 posts

    But if I remove all my HTML in my template this page still shows some content:
    http://janhekmanschool.nl/nieuws/

    Maybe this issue is here because I made flat files from all my templates?

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

ExpressionEngine News!

#eecms, #events, #releases