RewriteEngine On
RewriteCond %{REQUEST_FILENAME} \.ts$
RewriteRule ^(.*)$ ../api/ts_wrapper.php?file=$1 [L,QSA]
