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.

Paginate producing wrong URL

February 02, 2011 3:57am

Subscribe [6]
  • #1 / Feb 02, 2011 3:57am

    JusTyMe

    76 posts

    Hi,

    I have an issue with {auto_path} in the paginate tag. I am implementing the paginate for my entries.

    I am using the standard code, no changes yet.

    {if previous_page}
     <a href="http://{auto_path}">Previous Page</a>  
    {/if}
    
    {if next_page}
     <a href="http://{auto_path}">Next Page</a>
    {/if}

    This is the wrong URL produced for Next page

    <a href="http://www.my-site.com/site/info-from-partnerssite.php/P3">http://www.my-site.com/site/info-from-partnerssite.php/P3</a>

    Just some changes I made. I changed “index.php” to “site”. My template group name is “info-from-partners”. As you can see on the url, after my template group name, site.php was appended.

    Additional info: My server is running under Mac OSX Leopard.

    best regards,
    Jay

  • #2 / Feb 02, 2011 4:16pm

    Sue Crocker

    26054 posts

    Hi, Jay. How did you change index.php to site? What’s the reasoning behind it?

  • #3 / Feb 03, 2011 12:00pm

    JusTyMe

    76 posts

    Hi Sue!

    I followed this official EE guideline. I just want to confirm that I didn’t go through the unofficial guideline.

    http://ellislab.com/expressionengine/user-guide/installation/renaming_index.html

    I just found out today that when I renamed the index.php to “site”. I found out that the .php wasn’t removed when I checked it in the terminal. It means I still have “site.php” not purely “site”. . I didn’t do the renaming on the terminal but I did it in Mac OS X’s Finder.

    One thing I’ve found out too is my server can process my URL without the extension of php that is why I thought the process I went through was ok already before. But it wasn’t. The .htaccess for the ff. codes doesn’t work. These codes came from the link above.

    <Files mynewindex>
    AcceptPathInfo on
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files mynewindex>
    ForceType application/x-httpd-php
    </Files>
    <Files mynewindex>
    SetHandler application/x-httpd-php
    </Files>

    Nothing works with these on my server. I am running apache2 and php 5.2.x

    This code worked with .htaccess but nothing with the above codes.

    DirectoryIndex mynewindex index.php index.shtml index.html index.htm

    best regards,
    Jay

  • #4 / Feb 04, 2011 4:49am

    Ingmar

    29245 posts

    OK, taking a step back here: this is not a problem with pagination, after all, but with trying to rename “index.php” to “site”? What’s the current status, “site.php”?

  • #5 / Feb 04, 2011 5:05am

    James.Lex

    11 posts

    This is a wrong post. Sorry. Please delete it. Can’t delete it. Thanks

  • #6 / Feb 04, 2011 5:08am

    JusTyMe

    76 posts

    Yes. It appears only “site” in Finder but if I will check the file info. It is still site.php

    I renamed it purely “site” today in the terminal but .htaccess won’t treat “site” as a php but just displays a plain text even with the the ff. code.

    <Files mynewindex>
    AcceptPathInfo on
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>

    I tried the two options in the guidelines too but nothing worked.

    I am sure that .htaccess works because the ff.code is functioning and I AllowedOverride All in my httpd.conf

    DirectoryIndex mynewindex index.php index.shtml index.html index.htm


    As I’ve said I am using Mac OS X Leopard’s native Apache and PHP installation.

    Jay

  • #7 / Feb 04, 2011 5:29am

    Ingmar

    29245 posts

    You need to use “site” instead of “mynewindex”, like so:

    <Files site>
  • #8 / Feb 04, 2011 5:33am

    JusTyMe

    76 posts

    I did, sorry I just copied that from the guideline.

  • #9 / Feb 04, 2011 5:25pm

    Ingmar

    29245 posts

    OK. What we’re trying to achieve here is to tell your webserver to parse the “site” file as PHP even though it lacks the typical .php extension. Make sure “AllowOverride” is enabled.

  • #10 / Feb 04, 2011 5:28pm

    James.Lex

    11 posts

    .

  • #11 / Feb 04, 2011 5:30pm

    JusTyMe

    76 posts

    AllowOverride is enabled. As Ive said the ff. line is working in the .htaccess

    DirectoryIndex site index.php index.shtml index.html index.htm
  • #12 / Feb 06, 2011 9:25am

    Greg Salt

    3988 posts

    Hi JusTyMe,

    Let me clarify exactly what the situation is right now:

    1. You have renamed index.php to site in Terminal
    2. You have added the <Files site></Files> block to your .htaccess file
    3. You have added the DirectoryIndex line to your .htaccess file
    4. You have, in your CP at Admin > General Configuration, changed the site index file name to be ‘site’

    Is that correct? If so, is the ‘site’ file being parsed as PHP - I think it might be based upon your first post. If it is not, please confirm that. If it is being parsed as PHP then is the issue still that ‘site.php’ is being appended to your URLs? If it is then please post the entire contents of your .htaccess file.

    Cheers

    Greg

  • #13 / Feb 06, 2011 9:54am

    JusTyMe

    76 posts

    Hi Greg!

    Yes you are right.

    Here is my .htaccess

    DirectoryIndex site index.php index.shtml index.html index.htm
    
    <Files site>
    AcceptPathInfo on
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>

    Based on my test. The .htaccess is enabled because the first line works and redirecting to site properly

    DirectoryIndex site index.php index.shtml index.html index.htm

    But the <File site> is not parsing as PHP but it is just showing the php code/content of site (old index.php) in the browser as an ordinary text file

    Thanks….

    best egards,
    Jay

  • #14 / Feb 07, 2011 10:12am

    Sue Crocker

    26054 posts

    Hi, Jay. I’m going to post this to our testing team to see if it’s a bug with EE or not. Thanks in advance for your patience.

  • #15 / Feb 07, 2011 10:43am

    JusTyMe

    76 posts

    Hi Sue!

    That will be great. Anyway, I restored EE defaults already back to index.php. I think it will be a better idea to stay as it is for now.

    Cheers,
    Jay

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

ExpressionEngine News!

#eecms, #events, #releases