Forum Moderators: phranque
# If requested URL-path does not resolve to existing file in "/a/" path
RewriteCond %{REQUEST_FILENAME} !-f
# but does resolve to an existing file in the "/b/" path
RewriteCond %{DOCUMENT_ROOT}/b/$1 -f
# then externally redirect the client to a URL referring to the "/b/" path
RewriteRule ^a/(.*)$ http://www.example.com/b/$1 [R=301,L]