“No input file specified” solution
-
I just wanted to post something here – it’s not a question. I just installed WordPress for a client (yeah, a paying one), and I was having a *severe* issue getting the blog to show up. I installed/uninstalled 4 times, dropped the database each time, blah blah, fresh installs on a Linux server. Every time, I would get the “No input file specified.” error when trying to view the site.
No, I didn’t mess with permalinks, and nothing was showing up in the error logs – this is brand-spankin’ new…don’t even have the plugins installed yet.
I’m working on the site “incognito”, meaning there’s already a static site at “index.html”, but I’m working from “index.php”, so I changed the Blog URI to “https://bloghere.index.php” so I could work until the time came to make it live.
The problem was, when I viewed the page, WordPress would instert a trailing slash after the url…so instead of “https://www.sitename.com/index.php” I was getting “https://www.sitename.com/index.php/”. The former, I could see the site just fine, but the latter would result in the error. So for some reason, that trailing slash was royally screwing things up.
Well, I fixed it, and I’ve seen a couple of others who’ve noticed this issue as well, but no solutions. So I’m going to share mine.
In the .htaccess file:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME}.php -f RewriteCond %{REQUEST_URI} !/$ RewriteRule (.*) $1\.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ /$1 [R=301,L] </IfModule>
That removes the trailing slash at the end. This is for the default permalinks only – not any custom format. If you want a custom format, you can take the above and run with it to try and figure out how to fix. But I only needed the default (for now), and the client’s paying me by the hour, so I don’t have time to mess with it and see how to make it work with custom configurations.
But there, hope it helps someone else with this issue.
- The topic ‘“No input file specified” solution’ is closed to new replies.