I’d like to redirect my WordPress posts from /%title/ to %year/%month/%title/.
Since WP automatically redirects the pages when you do a new permalink structure, I’d like to have the redirect in my .htaccess file anyway so that Google is aware of the change.
This is what I have in my .htaccess file, so I’d just liket to confirm this is the correct structure:
RedirectMatch 301 http://url-example.com/$3 ^/([0-9]{4})/([0-9]{2})/(.*)$
Let me know, thanks.
Due to the dynamic nature of the WordPress URLs, I do not believe you will have much luck doing this in a single rule.
You could explicitly list these in
.htaccess. However, it’s likely WordPress is handling these redirects correctly for Google (i.e. 301).Use Firebug or HTTP Live Headers to verify.