如何使用 .htaccess 将扩展名为 .m3u8 的 URL 重定向到 php 脚本?

how to redirect URL with .m3u8 extension to php script using .htaccess?

我希望 http://www.mywebsite.com/play.m3u8?id=1234 to redirect to http://www.mywebsite.com/play.php?id=1234(play.php 使用 .htaccess 重写规则生成实际的 m3u8 url)! (换句话说,我想 "package" 把它变成一个假的 .m3u8 文件,以便 xbmc/kodi 处理它)

谁能告诉我如何创建这样的 .htaccess 文件。提前致谢。

您可以在 .htaccess:

中使用它
RewriteEngine on
RewriteRule \.m3u8$ /play.php [NC,L]