I'm moving a web site to wordpress but I wish to keep your current URL structure for Search engine optimization reasons.

The present site uses a mix of .htm and .html files. I discovered success in redirecting to .htm once the request is .html.

For instance

    RedirectMatch 301 (.*)\wp-site/mywebpage.html$ http://www.mydomain.com/wp-site/mywebpage.htm

I have a problem with the next:

once the .html file has lower and upper situation. I can not appear to locate a means to fix redirect any request regardless of the situation to the .htm equivalent

For instance: My-Posts/Alpha-Page.html must redirect to my-posts/alpha-page.htm or MY-POSTS/ALPHA-PAge.html redirects to my-posts/alpha-page.htm (or any one of "my-posts/alpha-page" that consists of uppercase. essentially all demands despite situation must redirect to any or all lowercase .htm file)

I understand it is a little difficult since it is a mixture 1) I am redirecting to .htm and a pair of) for that situation insensitivity.

Couple of points to consider:

  1. I understand Wordpress posts are situation-insensitive. Wordpress's static page are situation-sensitive.
  2. I understand RedirectMatch will not work since it matches it exactly.
  3. In my opinion I have to use RewriteCond and RewriteRule, but can't appear to find "good" step-by-step explanations. Also, I do not understand their variables (ie: %) and also the regular expression convention.
  4. I'm not an Apache/.htaccess or regular expressions expert by any means.

Theoretically, it appears there must be a means for this to operate. I'll continue to ascertain if I'm able to find solutions at stackoverflow or any other outdoors assets and when I actually do take action at stackoverflow, I'll marked this as solved and also have it removed.

Any assistance is appreciated!

Thanks

UPDATE 06/17/2011:

Here's my current .htaccess file

    # BEGIN WordPress

    <IfModule mod_rewrite.c>


    RewriteEngine On


    RewriteBase /wp-test-2011-06-13/

    RewriteRule ^index\.php$ - [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /wp-test-2011-06-13/index.php


    RedirectMatch 301 (.*)\wp-test-2011-06-13/redirect.html$ http://www.mydomain.com/wp-test-2011-06-13/redirect.htm


    RewriteRule ^ORLANDO-criminal-defense-attorney/defense-attorney-NEJAME.html$ /orlando-criminal-defense-attorney/defense-attorney-nejame.htm [QSA,NC,R=301]


    </IfModule>


    # END WordPress

UPDATE 06/20/2011:

Here's my current .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>

    Options +FollowSymlinks
    RewriteEngine On

    RewriteBase /wp-test-2011-06-13/
    RewriteRule ^/wp-test-2011-06-13/index\.php$ - [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* /wp-test-2011-06-13/index.php 

    RedirectMatch 301 (.*)\wp-test-2011-06-13/redirect.html$ http://www.mydomain.com/wp-test-2011-06-13/redirect.htm

    RewriteRule ^ORLANDO-criminal-defense-attorney/defense-attorney-NEJAME\.html$ /orlando-criminal-defense-attorney/defense-attorney-nejame.htm [QSA,NC,R=301]

    </IfModule>

    # END WordPress

I recieve a Wordpress "Page Not Found" page after i type http://www.mydomain.com/wp-test-2011-06-13/ORLANDO-criminal-defense-attorney/defense-attorney-NEJAME.html (or lowercase equivalent with .html)