Title: Redirect post only permalink (category)
Last modified: April 19, 2021

---

# Redirect post only permalink (category)

 *  Resolved [mirulart](https://wordpress.org/support/users/mirulart/)
 * (@mirulart)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/redirect-post-only-permalink-category/)
 * Hi,
 * My intention is to redirect my permalink post from
 * [http://domain.com/postname/](http://domain.com/postname/)
    to [http://domain.com/category/postname/](http://domain.com/category/postname/)
 * I’ve use below expression, unfortunately it apply to all my post (other category)
   and also Page URL ([http://domain.com/pagename/](http://domain.com/pagename/)).
 *     ```
       Source: ^/(?!category)(.*)
       Target: /category/$1
       ```
   
 * Is there a best way to redirect such permalink?
 * Thank you.
 * Best.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/redirect-post-only-permalink-category/#post-14335092)
 * There is no good way of matching only posts with a regular expression. You will
   need to match each post individually.
 *  Thread Starter [mirulart](https://wordpress.org/support/users/mirulart/)
 * (@mirulart)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/redirect-post-only-permalink-category/#post-14335181)
 * Ouch, as i have 10k of post that would be massive work hmm. Is any suggestion
   you have to ease beside manual match?
 * Thanks John
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/redirect-post-only-permalink-category/#post-14335552)
 * There is a permalink migration feature ([https://redirection.me/support/site-options/](https://redirection.me/support/site-options/))
   but it doesn’t work for this particular combination. It may do in the future,
   but right now there is no other solution – you cannot derive the category purely
   from the URL, and migrating the permalink is tricky and not fully working.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Redirect post only permalink (category)’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/redirect-post-only-permalink-category/#post-14335552)
 * Status: resolved