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.

Not Found page

January 31, 2012 2:00am

Subscribe [3]
  • #1 / Jan 31, 2012 2:00am

    chrisstroud

    17 posts

    Hello,

    I am using the lasts install of EE with MSM. I recently created my third site. I have one template group with the ‘index’ template and another template called ‘features’. If you go to this link you will see that the index template is working correctly: http://www.leanoutprogram.com/site/

    But, when you go to this link I get a 404 page: http://www.leanoutprogram.com/site/features

    Any thoughts on how to make it so that the page is showing correctly?

  • #2 / Jan 31, 2012 8:39am

    Boyink!

    5011 posts

    Do you have an .htaccess file setup for that site?  I note the error message mentions /index.php.

  • #3 / Jan 31, 2012 10:58am

    chrisstroud

    17 posts

    Yes this is what I have:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Removes index.php
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    # If 404s, “No Input File” or every URL returns the same thing
    # make it /index.php?/$1 above (add the question mark)
    </IfModule>

  • #4 / Jan 31, 2012 11:03am

    Boyink!

    5011 posts

    If you remove that does the site work?

  • #5 / Jan 31, 2012 11:18am

    chrisstroud

    17 posts

    Yes the site works with out the .htaccess file. The error message changes to “The requested URL /site/features was not found on this server.”

  • #6 / Jan 31, 2012 11:22am

    Boyink!

    5011 posts

    But you said you have a “features” template in your site group?  So

    http://www.leanoutprogram.com/index.php/site/features

    Should work without the .htaccess file in place?

  • #7 / Jan 31, 2012 11:27am

    chrisstroud

    17 posts

    I just found that this is working: http://www.leanoutprogram.com/site/?/features

    Any thoughts on how to remove the ‘?’ ?

    Thank you for the help so far.

  • #8 / Feb 01, 2012 6:57am

    John St-Amand

    865 posts

    I don’t really completely understand everything being done in your htaccess file, but it seems as though the “?” is being added in by the htaccess rewrite rule itself, even though it notes it is supposed to be removing index.php.  The ? winds up right where index.php would be natively in the URL.

    Here’s the section of my htaccess file that I use to remove index.php (see this thread for the full post on the topic):

    # Redirect index.php Requests
    # ------------------------------
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{THE_REQUEST} !/NAME_OF_YOUR_SYSTEM_FOLDER_HERE/.*
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
    
    # Standard ExpressionEngine Rewrite
    # ------------------------------
    RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Notice the last line of each grouping -

    Yours:

    RewriteRule ^(.*)$ /index.php?/$1 [L]

    Mine:

    RewriteRule ^(.*)$ /index.php/$1 [L]

    My interpretation is that the ? is actually being inserted by your htaccess rewrite rule.  If you remove it from that last line, you may be back in business.  I’m not an htaccess expert - I’m just using what I’ve learned from Nick Benson and others in the community and noticing what’s different between what works for me and what you’re trying to use and you say isn’t behaving as expected.

    Let me know if that helps.

    Cheers.

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

ExpressionEngine News!

#eecms, #events, #releases