I'm trying to write a redirect rule that redirects urls of the form:

<http://example.com/?lang=fr/hub/anypagehere> => <http://example.com/hub/anypagehere/?lang=fr>

only if there is "hub" in the url.

Is there a way to do this with .htaccess?