Title: Redirection problem after migrating the Permalink.
Last modified: August 21, 2016

---

# Redirection problem after migrating the Permalink.

 *  [Tanmaygeek](https://wordpress.org/support/users/tanmaygeek/)
 * (@tanmaygeek)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/redirection-problem-after-migrating-the-permalink/)
 * I recently migrated the permalink for my website posts from /%postname%/%post_id%/
   to /%postname%/ . I have added this line at my htaccess file to redirect the 
   older urls.
 * `RedirectMatch 301 ^/([^/]+)/(\d+)/$ http://www.mysite.com/$1`
 * This rule is working fine for the posts of my site. But the problem is with the
   sub pages of my home page. The sub-pages are redirecting to a 404 not found page.
   e.g [http://www.mysite.com/page/2/](http://www.mysite.com/page/2/) is now redirecting
   to [http://www.mysite.com/page](http://www.mysite.com/page) which returns 404.
 * What to do to avoid this issue?

Viewing 1 replies (of 1 total)

 *  [Mike](https://wordpress.org/support/users/manndtp/)
 * (@manndtp)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/redirection-problem-after-migrating-the-permalink/#post-4395732)
 * Depending on how many posts you have to redirect, I’d take a look at [404 Redirected](http://wordpress.org/plugins/404-redirected/),
   which can capture the 404s and allow you to create the 301s that way. This is
   how I typically create the 301s 🙂

Viewing 1 replies (of 1 total)

The topic ‘Redirection problem after migrating the Permalink.’ is closed to new 
replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Mike](https://wordpress.org/support/users/manndtp/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/redirection-problem-after-migrating-the-permalink/#post-4395732)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
