#if none of these are the case, execute redirect to /users/RewriteRule ^(.*)$ /users/$1 [QSA,L]

So, to sum that up, img.web-site.net reads from the /images/ folder, any username on the site (hank.web-site.net) reads from /users/ (username is grabbed from the url with php) and www reads from /main/. and subfolders and the query string are appended...