Created
December 7, 2017 13:57
-
-
Save evemilano/e6707187af701510861a95194ce84d17 to your computer and use it in GitHub Desktop.
WordPress 301 redirect after permalink change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## From permalink "Day and Name (/%year%/%monthnum%/%day%/%postname%/)" to "postname" | |
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://www.yourwebsite.com/$4 | |
## From permalink "Month and Name (/%year%/%monthnum%/%postname%/)" to "postname" | |
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.yourwebsite.com/$3 | |
## From permalink "Numeric (/archives/%post_id%)" to "postname" | |
RedirectMatch 301 ^/archives/(\d+)$ http://www.yourwebsite.com/?p=$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Articolo a supporto: https://www.evemilano.com/esempi-mod-rewrite-htaccess-apache/