I've migrated a 'conventional' html website to the WordPress. I want to preserve the page ranks for the google indexed pages of the old site.
However all the old links are with .shtml extension compared to the new WP URL, otherwise everything in the URL is the same for old and new sites.
So I planed is a rewrite to achieve the following result.
OLD URL: http://example.com/my-page.shtml
NEW URL:http://example.com/my-page
The htaccess code is
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/?#\ ]+/)*[^.?#\ ]+\.shtml\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.html$ http://www.example.com/$1/ [R=301,L]
My question is,
is this the efficient (from ranking & server point ) code to achieve the result I mentioned.
Or is there a better/smarter way to achieve this.....