It's only meant to redirect the main index.php.
URLs like /index.php/something and /something are not considered as duplicates by search engines since early 2010.
There is no point trying to fix something that is not broken, when the fix might break some sites.
There are cases where redirecting from index.php/something to /something would, in fact, break things. Out of the top of my head, because I've seen both today and it's barely 2pm:
- Form POST. If a browser tries to POST to /index.php/something and you tell it to redirect to /something it will use GET, not POST, therefore it will not POST the form. This leads to all sorts of hilarity. Combine this with not setting “Use URL Rewriting” in your Global Configuration and you end in a situation where you can't even log into the frontend of your site.
- API endpoints, including the Joomla API application itself. Most, but not all, API clients will use the redirection correctly but some will default to repeating the request using GET instead of POST, PUT, PATCH, or DELETE which causes the same kind of problems I already mentioned, just far harder to troubleshoot and address. By the way, this is the default behaviour of Guzzle HTTP, the most used PHP HTTP library to interface with APIs. Unless someone is keenly aware of the issue, the won't know to set strict to true.
As you can see, “fixing” this breaks a lot of sites which is why I deliberately chose to only redirect the homepage and make it an option which I recommend turning off on most sites (it comes from a time long before 2010, when index.php in URLs would indeed mark them as duplicates).
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!