.htaccess RewriteRule to include post type and taxonomy

This rewrite rule will surely work. Add this code to your .htaccess file.
RewriteEngine On
RewriteRule ^uni/([^/]*)$ /gallery/?university=$1 [L]