I'm migrating a conventional (using html files) website to a Worpress (extension-less) system. Currently the files are with shtml,htm & html extensions. Other than the extension part, the URLs remain identical in the both websites.
How do I achieve a mass 301 redirect from http://example.com/page.shtml to http://example.com/page.shtml . I want it to be done to preserve the pageranks by way of 301 redirect.
I've tried both the concepts listed below, but without success. Both throws up server error message.
### Option 1
Options +FollowSymlinks
rewriteengine on
rewriterule ^(.+)\.s?html?$ http://example.com/$1 [r=301,nc]
### Option 2
Option +SymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.s?html$ [%{HTTP_HOST}...] [L,R=301]
What is the better strategy to achieve the 2 goals.
1.Redirect all http://example.com/page.shtml to http://example.com/page.shtml
2.Preserve the pagerank.
:) new_b