I'm attempting to write a mod_rewrite statement that will permit me to redirect in one domain to a different passing your directory title. For instance I have to have the ability to write a redirect from:

http://xxx.com/u/7hb9n

to

http://xxx.co/7hb9n

I've attempted various variation that either produce an interior server error or don't send with the directory title.

this can redirect http://xxx.com/u/7hb9n to http://xxx.co/7hb9n

begin using these rules when the .htaccess is at the bottom level.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^([a-z0-9]+)/([a-z0-9]+)/?$ http://www.domain.co/$1/$2 [R=301,L]

or maybe the .htaccess is incorporated in the /u/ folder, begin using these rules

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^([a-z0-9]+)/?$ http://www.domain.co/u/$1 [R=301,L]