RewriteEngine On
RewriteRule (.*)\.deb /cgi-bin/download.cgi?m=jaist\&f=/tomoyo/51586/$1.deb [L,NE]
