No input file specified.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jraede
Forum Contributor
Posts: 254
Joined: Tue Feb 16, 2010 5:39 pm

No input file specified.

Post by jraede »

Wasn't sure where to post this so I chose here...

I'm implementing Apache's mod_rewrite, and it's working for almost everything, but for some reason when I try to access a "fake" folder with the same name as a php file in my root directory, I get a "No input file specified." error. For example, I have login.php in my root, and when I try to go to www.my-site.com/login/, I get that error. But when I try to go to a directory that does not share its name with a php file in the root directory, like www.my-site.com/asdfasdf/ it correctly routes to the catch-all index.php page and displays a 404 error, in this case.

What's weird is I didn't have this problem locally on MAMP, and I'm also not getting it on another server with the same hosting company, so I'm pretty sure it's not a problem with my code. The php.ini files are the exact same in both servers, as are the htaccess files, except one redirects to index.php within a subfolder, and one redirects to index.php in the root.

htaccess looks like this in the one that's not working:

[syntax]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
[/syntax]

I have no idea why this isn't working...again, it's only for "fake" directories that share a name with a php file in the root.

I'd appreciate any help.
Post Reply