"No input file specified" mod_rewrite Problem

I made several changes to some mod_rewrite rules which were working fine on my local Apache server.  I then published to a staging site hosted on GoDaddy for further testing. The rules which directed permalinks to a PHP program stopped working; “no input file specified” appeared on my browser instead. No access to the error logs on this bargain basement hosting plan makes debugging all but impossible.

I finally found this post which presented a solution:

“Turn off MultiViews. It seems when MultiViews is enabled there is confusion between MultiViews and the RewriteRules. So if you go to /user there will be no problem, MultiViews will translate it to /user.php. However when you go to /user/blah/login/blah or one of the other more complex clean URLs it gets confused.”

Adding “Options -Multiviews” to my .htaccess file fixed the problem. Not sure why this only happens on my GoDaddy account and not locally or at our other hosting accounts. Is this the one and only error that results from Multiviews and ModRewrite colliding, or are there others? If so, maybe I’ll shut off Multiviews on all my web sites until I need to add multiple language support.

posted in Apache, php by Bozzie

3 Comments to ""No input file specified" mod_rewrite Problem"

  1. mWm wrote:

    Thank you so much. That “Options -Multiviews” did all the job I needed!

  2. b.b.goyal wrote:

    hi, you are genius. i was trying solution for the same problem. one mod_rewrite was working, whereas the otherone was not working, whereas text, rules, etc everything was same. when i type Options – Multiviews in .htaccess file, it immediately worked. Thanks once again.

  3. Apache .htaccess problem: No input file specified - Just just easy answers wrote:

    […] Turn off multiviews in .htaccess (Options -Multiviews) as read in Sheepdog IT […]

Powered by Wordpress and MySQL. Theme by openark.org