.htaccess rewrite condition trailing slash only for specific directories
snippet in htaccess

.htaccess rewrite condition trailing slash only for specific directories

user4496

RewriteCond %{REQUEST_URI} ^/(courses|foo|bar)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]