Note that this is written for use in http.conf. For use or testing in .htaccess, remove the leading slash of the RewriteRule pattern.
I'm not sure this code captures exactly what you're trying to do. Because this code implements an external redirect, it will redirect both users and internal subrequests, making only /zzz/messages/35 accessible for requests to anything in the /zzz/messages/ path. If you are just trying to establish a fixed "entry point" to your messages, you will have to add Conds which look at the HTTP_REFERER and other vars in order to allow access to other subdirs after the user enters through the proper page. Actually, without session tracking, it won't work perfectly, but you might get close enough.