Some time ago we changed our permalink address for our wordpress blog from something like
https://www.mydomain.com/blog/2015/09/20/some-post/ to get rid of the index.php part. Since it takes some time for google to crawl all the pages again, the deprecated links were still shown in the search results. Unfortunately all the links lead to a “No input file specified” error.
The fix for this is easy.
If you are able to edit or create a
.htaccess file and your server supports URL rewrites (mod_rewrite module for apache, which is very common) just add some lines like this:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^blog/index.php/(.*) /blog/$1 [R=301,L] </IfModule>
This will tell a browser or even the google crawler that a webpage moved from
If you already have rewrite rules in your
.htaccess file (e.g. the permalink rewrite rules of wordpress) just put these lines at the very beginning of your rewrite rules.
Leave a Reply