I first installed a WP blog at mydomain.com/blog and published my first post. The post URL is - http://www.mydomain.com/blog/?p=4
Later I decided to install WP at the root directory of the domain mydomain.com and removed/deleted the /blog/ directory from the server. So, http://www.mydomain.com/blog/ no longer exists.
The newly installed blog has a post with the URL - http://www.mydomain.com/a-nice-article.html (yes, I set the Permalink structure as /%postname%.html)
I first tried using the following -
Redirect 301 /blog/?p=4 http://www.mydomain.com/a-nice-article.html
But it didn't work. Later I learned from other threads of this forum that it won't work like that. My question is how to achieve this? Any help is appreciated.
P.S. I tried a lot of redirect plugins but with no success. I can redirect to the root domain URL using a couple of them though. But I want to redirect to that specific page.