Ok, but you said;
"I can replace string if is not .m3u8 but if is on .m3u8 then I have a problem"
Can you explain what the problem is?
To me this seems to be working.
If you do a curl -h "http://domen.com/test/playlist.m3u8"
and you want to hide playlist.m3u8, you replace playlist.m3u8 with playlist.xxxx
Maybe this http://serverfault.com/questions/489672/nginx-url-rewrite-with-string-substitution
or this http://wiki.nginx.org/NginxHttpRewriteModule
"I can replace string if is not .m3u8 but if is on .m3u8 then I have a problem"
Can you explain what the problem is?
To me this seems to be working.
If you do a curl -h "http://domen.com/test/playlist.m3u8"
and you want to hide playlist.m3u8, you replace playlist.m3u8 with playlist.xxxx
Maybe this http://serverfault.com/questions/489672/nginx-url-rewrite-with-string-substitution
or this http://wiki.nginx.org/NginxHttpRewriteModule