Kodi Community Forum

Full Version: Redirecting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I have a server component, what provides the m3u. I dont want to send to the user the stream urls, so the m3u is something this:

Code:
#EXTM3U
#EXTINF:-1 tvg-id="channel_1" group-title="gt" tvg-logo="logo.png",channel1
https://my_server_ip/getchannel/user_hash/channel1_hash
#EXTINF:-1 tvg-id="channel_2" group-title="gt" tvg-logo="logo.png",channel2
https://my_server_ip/getchannel/user_hash/channel2_hash
#EXTINF:-1 tvg-id="channel_3" group-title="gt" tvg-logo="logo.png",channel3
https://my_server_ip/getchannel/user_hash/channel3_hash
#EXTINF:-1 tvg-id="channel4" group-title="gt" tvg-logo="logo.png",channel4
https://my_server_ip/getchannel/user_hash/channel5_hash

My getchannel code redirects the get:

PHP Code:
header("Location: " $row["channel_url"]); 

When the channel is a http/https stream, then the redirect working, but the rtmp/rtsp redirects not. How can I redirect the rtmp streams?

Second question:

On http/https streams the redirect works, but kodi works as following:

1. send HTTP HEAD request to my server
2. send HTTP HEAD request to redirected location
3. send HTTP GET request to my server
4. send HTTP GET request to redirected location
5. send HTTP GET request to my server
6. send HTTP GET request to redirected location

I understand 1-4, but why sends Kodi 5-6?