php fast-cgi No input file specified error

No input file specified error

Sometimes you may get this error when you switch the web server API module to CGI/FastCGI. I got this error during the site migration time.

Quick fix for this error is, add a “?” append to index.php which written in .htaccess file.

The new .htaccess file part will looks like,

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

Leave a comment