问题原文
原帖链接 · Rajesh Pachaikani · CC BY-SA 4.0
My old WordPress configuration added index.php to the permalinks of all my pages.
e.g: https://example.com/index.php/contact etc.,
It was indexed already by google crawler. Now I reconfigured WordPress to make the URLs to look like https://example.com/contact
But google search still has the results showing https://example.com/index.php/contact.
All old URLs are redirecting to corresponding new pages. But I don't want to display index.php in google search results.
How to remove indexed URLs with index.php and to display the new URLs?
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 4.0
First check that your URLs give "301 Permanent" redirects. If you are redirecting using "302 Temporary", "Meta Refresh", or JavaScript, it will take longer.
All you have to do is wait. Google automatically stops indexing redirecting URLs and indexes the pages they point to. For your most popular pages, it should happen within a few weeks. If you have thousands of pages, it could take months until every single last one of them is changed in the Google index.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
