Many of our website pages were crawled as duplicate urls by google search engine. These duplicate urls are segmented with index.php in the url address.
This crawling decreases our site's SEO ratings. I have also checked the OctoberCMS site's url which also works with index.php, say for example
http://octobercms.com/index.php/docs/cms/themes and also for laravel
I know it is not an error but some how wordpress overcomes this issue by redirecting to the same url request without the index.php slug. What I need is, how to redirect the url when appended or segmented by index.php in the url address.
Within .htaccess file all the url request for the server is redirected to index.php and from there the routing begins, so I can't able to touch the .htaccess file to invoke a redirection. I want those duplicate urls to redirect to 404( object not found page) or to home page.