Who could help me with the following:

I am moving my site to another domain AND I want to change my permalink structure. I wish to edit my .htaccess file of my OLD domain.





All my old URL's should be 301 redirected to the new URL's and new permalink structure.

What are the necessary steps I should take?

  • this blog post may can be your solution techtage.com/changing-permalink-structure-wordpress
    – rheeantz
    Commented May 22, 2017 at 15:03
  • thanks, but this generator only works with changing permalink structure and in my case I am changing domains too.
    – Rick
    Commented May 22, 2017 at 15:14
  • you can try to add additional php redirect on your single.php template. So after the oldmain get redirected with .htaccess rule you can redirect using php into newdomain
    – rheeantz
    Commented May 22, 2017 at 15:15
  • I only want to edit my .htaccess file on my old domain
    – Rick
    Commented May 22, 2017 at 15:17
  • please check my aswer @Rick
    – rheeantz
    Commented May 22, 2017 at 15:50

2 Answers 2


on your old domain add this following rule at the top of .htaccess

RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://newdomain.com/$3

plase let me know if its work or not.

  • you can mark my answer as accepted.. so people with the same problem will know the solution.
    – rheeantz
    Commented May 22, 2017 at 16:10

Assuming Mod_Rewrite is active, on .htaccess file you can use:

Redirect 301 http://www.olddomain.com/2015/05/22/example-post http://www.newdomain.com/example-post

  • Sorry, I was not clear. It concerns ALL links on the old site. Not just one URL.
    – Rick
    Commented May 22, 2017 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.