Forum Moderators: phranque
The code is a trivial one-line RewriteRule with [R=301,L] flags.
RewriteRule ^(.*)\ $ http://www.example.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^%?\ ]*)\%[^?\ ]*(\?[^\ ]*)?\ HTTP/RewriteRule ^ http://www.example.com/%1%3 [R=301,L]