Title: Will this Code Work For Redirection After Permalink Change
Last modified: August 31, 2016

---

# Will this Code Work For Redirection After Permalink Change

 *  [decentguy49](https://wordpress.org/support/users/decentguy49/)
 * (@decentguy49)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/will-this-code-work-for-redirection-after-permalink-change/)
 * I am planning to change the permalink structure of my website, at this time it’s
   like domainname.com/post-name/ and now I am planning it to change something like
   domainname.com/2016/02/postname/ID
 * I know after changing permalink I have to make 301 redirects and as I have around
   3k+ post so doing manually is not the best idea for all post
 * What if I add the following code to .htaccess file? will its redirection work?
 * > `RedirectMatch 301 ^/$3 http://domainname.com/([0-9]{4})/([0-9]{2})/([^/]+)/(\
   > d+)$`

The topic ‘Will this Code Work For Redirection After Permalink Change’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [decentguy49](https://wordpress.org/support/users/decentguy49/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/will-this-code-work-for-redirection-after-permalink-change/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
