|

[FIX] Changing WordPress Permalinks Breaks Old Date-Based Links

WordPress Permalinks - [FIX] Changing WordPress Permalinks Breaks Old Date-Based LinksProblem: Changing “name and date-based” permalinks to “name-based” permalinks breaks all of my site’s old links.

Changing: https://www.designparc.com/2008/08/08/post-title/
To: https://www.designparc.com/post-title/
breaks the former date-based connection.

Solution: Rick Beckman’s “How to Update Your WordPress Permalinks Without Causing Link Rot” article

Add RedirectMatch call to .htaccess file so that old “name and date-based” permalinks will seamlessly redirect to “name-based” permalinks. Swap out http://example.com/ with your site’s URL.

RedirectMatch permanent ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/([a-z0-9-/]+) http://example.com/$1

Read How to Update Your WordPress Permalinks Without Causing Link Rot for full directions.

Outcome: Works great and redirects all old name-and-date-based URLs. Categories pages work properly. Archive pages do NOT work properly, just keeps displaying the Home page.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *