How do you setup a RewriteCond/RewriteRule to 301 redirect the URL

http://www.example.com:8080/~user/two%2dwords/more%2dwords/

to

http://www.example.com:8080/~user/two-words/more-words/

i.e., changing all %2d encodings versus. hyphens?

When the RewriteRule target URL consists of special charaters individuals charaters could be transformed into hexdoce by utilizing No escape [NE] flag.