Moving the root, but not sub-queries
This is an example of using mod_rewrite to move the root of your document, but not any scripts handling queries deeper down. In my case, I have an old bblog blog that I want to move, but I don’t want to suddenly break all of my old posts. This rule will rewrite any URL ending in blog or blog/, as long as the request string is null. Then it forwards you with HTTP code 301 (Permanently moved) to this blog address.
RewriteEngine On
RewriteCond %{REQUEST_URI} blog[/]*$
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)$ http://elliottback.com/wp/ [R=301]
This second rule simply redirects requests from the old RSS URL to the new WordPress URL. For the few people that syndicate that, they won’t even notice the change in platform!
RewriteCond %{REQUEST_URI} blog/rss.php(.*)$
RewriteRule ^(.*)$ http://elliottback.com/wp/feed/rss2/

