I am working on wordpress blog and the its has the url pattern something like this. localhost/blog/2012/10/12/sample-post/ .
Now i have updated the url pattern to localhost/blog/sample-post/.
Now i need a redirection to second URL pattern if someone enters the first URL Pattern as i have already submitted URLs with first pattern to couple of articles.
i.e, localhost/blog/2012/10/12/sample-post/ should be redirected to localhost/blog/sample-post/
Can anyone assist me by providing htacess code ?
Try adding these to the htaccess file in your document root. Make sure they are before any wordpress related rules: