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.

.htaccess Generator & "No input file specified"

August 23, 2010 11:37am

Subscribe [2]
  • #1 / Aug 23, 2010 11:37am

    Farm.Co

    38 posts

    Hey there,

    We’re trying to remove index.php with Leevi’s addon, but we’re getting a “No input file specified” page. I read some other related posts, and forced url query strings, but results are still the same.

    Here’s the htaccess I have, which is pretty much the same that comes with the addon:

    # secure .htaccess file
    <Files .htaccess>
     order allow,deny
     deny from all
    </Files>
    
    # EE 404 page for missing pages
    ErrorDocument 404 /index.php/{ee:404}
    
    # Simple 404 for missing files
    <FilesMatch "(\.jpe?g|gif|png|bmp|css|js|flv)$">
      ErrorDocument 404 "File Not Found"
    </FilesMatch>
    
    # Although highly unlikely, your host may have +FollowSymLinks enabled at the root level, yet disallow its addition in .htaccess; in which case, adding +FollowSymLinks will break your setup (probably a 500 error), so just remove it, and your rules should work fine.
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    
    # remove the www - Uncomment to activate
    # RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
    # RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]
    
    # Remove the trailing slash to paths without an extension
    # Uncomment to activate
    # RewriteCond %{REQUEST_URI} /$
    # RewriteCond %{REQUEST_FILENAME} !-d
    # RewriteRule ^(.+)/$ $1 [L,R=301]
    
    # Remove index.php
    # Uses the "include method"
    # <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method">http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method</a>
    RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} ^/({ee:template_groups}{ee:pages}members|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]
    
    If I uncomment this portion: 
    
    # RewriteCond %{REQUEST_URI} /$
    # RewriteCond %{REQUEST_FILENAME} !-d
    # RewriteRule ^(.+)/$ $1 [L,R=301]

    I can access pages without but I’m redirected to the index.php/mypage url.

    Any suggestions will be highly appreciated!
    Thanks,

    Santiago.

  • #2 / Aug 23, 2010 12:42pm

    Farm.Co

    38 posts

    Fixed!

    I followed the snippet at http://buildwithstructure.com/documentation/playing_nice_with_lg_htaccess_generator/ and talked to Dreamhost to see if there was anything missing.

    Don’t know what did the trick, but it works.

    S.-

  • #3 / Sep 30, 2010 2:15pm

    dirksnat

    38 posts

    With Dreamhost, you have to turn off fastcgi in the Dreamhost Control Panel on the Manage Domains page.

    That should get nsm .htaccess generator working for anyone using Dreamhost.

  • #4 / Sep 30, 2010 2:19pm

    Farm.Co

    38 posts

    Good to know!

    We have our dev server on Dreamhost (might not be the best choice, but we like it too much) so your advise comes great to handle future projects.

    Thanks!

  • #5 / Sep 30, 2010 6:13pm

    dirksnat

    38 posts

    No problem!  I’ve had my fair share of configuration issues with Dreamhost, but I seem to be sorting them out.  I think they do a good job, you just have to iron out the kinks.  All of the issues have been minor, anyway.

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

ExpressionEngine News!

#eecms, #events, #releases