No Input File Specified Error Godaddy

Most Helpful Article

A site that I work with that is built on the CodeIgniter framework today started showing the error “No Input File Specified” when visiting any page other than the homepage. The cause wasn’t immediately available as I’d never seen this error before. It also wasn’t your average PHP error so I had to dig a bit further. After a while I came across a possible solution that, after trying, seemed to do the trick.

The Solution

The error wasn’t in my actual code (that’s what a developer likes to hear!), but was rather to do with the .htaccess file for my site. I’ve included below the part of my .htaccess file I had to change to get this to work correctly:

Before

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

After

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

Spot the difference? Note the question mark following ‘index.php’ in the second snippet. In adding this my site now worked as expected. Why this changed randomly I’ll never know but I hope this helps if you find yourself in the same situation.

Or try this:

https://github.com/EllisLab/CodeIgniter/wiki/Godaddy-Installation-Tips

About The Author

Most Helpful User