The mod rewrite would parse or make avialable a variable out of the url
http://URLOFGALLERY.com/gallery2/WMID
for example, and WMID could be the variable, the value could be passed on to a gallery, filling in the link code values, say with php. Actually same way many write or create SE friendly urls from dynamic content. Could even have more than one variable. Many uses...
ronnie