Hi I am trying to move my blog from Blogger to WordPress and I want to keep a simple and clean URL structure like http://www.example.com/post-name/
In blogger, I have the following URL structure:
www.example.com/2017/02/post-name.html
www.example.com/2017/02/post-name.html?m=1
www.example.com/2017/02/post-name.html?m=0
I can redirect all such URLs from Blogger to a clean URL on WordPress with the structure http://www.example.com/post-name/
using the redirection plugins for WordPress.
I am using the following regex expression
- Source URL:
^/\d{4}/\d{2}/(.*).html+.*
- Target URL:
http://www.example.com/$1/
The above setup worked perfectly fine, but I want to achieve the same using the redirects server-side by editing the .htaccess
file and this tool has an option to export the redirect in .htaccess
format to update it on the server. But that exported rewrite rule is not working.
Here is the exported rewrite from Redirection Plugins:
# Created by Redirection
<IfModule mod_rewrite.c>
RewriteRule ^\d{4}/\d{2}/(.*).html+.* http://www.example.com/$1/ [R=301,L]
</IfModule>
# End of Redirection
What should I do or is there any issue with my expression for .htaccess
file?