Google “No Input File Specified” Error with index.php in URL

Amarnath Prabhakar October 31, 2011 0

Recently I migrated from Yahoo servers to Godaddy servers owing to many problems with Yahoo hosting servers, the primary being cost. This migration spelt doom to my blog, I lost all my traffic from google. Upon some going back to my site URLs indexed on google I zeroed in on the issue. The Yahoo servers required me to include “index.php” as a prefix to my permalink structure for it to function effectively.

This prefix was added for SEO purposed after understanding that the pretty permalinks were liked by Google and it was important to have our permalinks with keywords. So, the permalink structure was updated as “index.php/%category%/%postname%” and this was how all the URLs were indexed in google search engine.

Then came the migration to Godaddy Servers, this change was good considering the amount of money I would save with shared hosting. The indexed URLs on google still had index.php in them and clicking on search results would result in “No input file specified.” error. This was it, no traffic cam from the search engines to the website and thus I lost all the traffic and of course all the money I could have earned through this period. Check the image below

This was it, I panicked and was there for almost a week. I then realized that this is one problem I should not ignore and I started analyzing the problem. After much research I wondered if the redirection wordpress plugin can be used to redirect all the URLs which have an index.php to URLs which don’t have one. Tried the same but there was no change in the situation, why? because the URLs from Google search results pages did not even hit UnoBlogger server. The redirection plugin can only work on traffic that comes to the server to be redirected. I was still in this situation and panic mode.

A little while later I came to terms with the fact that the URLs were being redirected at the root level and a .htaccess file should hold the solution. I was right, after searching on Google I cam across this article “Removing index.php from ExpressionEngine URLs“. In this article they provided a solution to include

RewriteRule ^(.*)$ /index.php?/$1 [L]

in our .htaccess file and have the rewrite engine on. This provided the desired result, it forwarded all the indexed URL link to the new URL schema without the index.php. I was very happy and this happiness was shortlived. Although the URLs were getting redirected as I expected I could not access my blog’s back end. Even www.unoblogger.com/wp-admin threw a 404 page not found. I was now losing patience and was getting irritated.

After some time, I went back to Google and searched for further tips on troubleshooting for this index.php problem on wordpress. Then I finally, after weeks of panic period found this article “COMPLETELY REMOVE INDEX.PHP FROM EXPRESSIONENGINE URLS

Here, the solution given was to include two lines of rules to .htaccess file and is below

RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]

RewriteRule ^index\.php(.+) $1 [R=301,L]

This was it, it solved the issue of index.php in the URLs that were indexed on the search engines and at the same time did not break the backend. I had access to the admin pages, the dashboard and the entire backend.

Coming to think of the situation I was in, it was not such a problem. Our understanding of certain issues become the culprit to fretting on problems we face day on day.

 

Leave A Response »