| View previous topic :: View next topic |
| Author |
Message |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Thu Mar 03, 2011 4:32 pm Post subject: sending status code possible or redirect to other server? |
|
|
Hi together,
I have the problem, that a stream was moved to another icecast server, but several listeners have cached my Ip-address and now I need to tell them, that the stream is not available anymore on this server.
Is there a possibility to send a status code 301 for requests on a single stream?
May there be a possibility to move/redirect all requests on this stream to another server?
I am looking forward to receive your ideas.
Kind reagrds
JohnnyOh _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
| Back to top |
|
 |
m3gab0y
Joined: 15 Aug 2009 Posts: 47 Location: London, UK
|
Posted: Fri Mar 04, 2011 10:50 am Post subject: Re: sending status code possible or redirect to other server |
|
|
| JohnnyOh wrote: |
Hi together,
I have the problem, that a stream was moved to another icecast server, but several listeners have cached my Ip-address and now I need to tell them, that the stream is not available anymore on this server.
Is there a possibility to send a status code 301 for requests on a single stream?
May there be a possibility to move/redirect all requests on this stream to another server?
I am looking forward to receive your ideas.
Kind reagrds
JohnnyOh |
You can start up a web-server suite (example: XAMPP), setup it to start on your server's port (example: 8000 instead of the default 80), and use a simple PHP script to redirect the listeners, located in a folder with the same name as your mountpoint, at the server's web root.
In other words:
1. Install XAMPP
2. Find httpd.conf and find the port 80 setting, change the port to 8000 (or whatever your server's port was)
3. create a simple index.php in C:\xampp\htdocs\mountpointname (or where you've installed XAMPP)
4. open that index.php file and put in this code:
| Code: |
<?php
header("HTTP/1.1 301 Moved Permanently");
header( 'Location: http://new-server-url.com:8000/mountpoint' );
exit();
?> |
5. adjust the above code to your needs
6. copy the .m3u file from your new server, pointing to your mountpoint (you can obtain that file by going to http://your-server.com:8000/mountpoint.m3u) to the XAMPP's webroot/htdocs directory
7. you're done! |
|
| Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Fri Mar 04, 2011 11:10 am Post subject: |
|
|
Hi m3gab0y,
thank you for your reply. I already thought of this, but I hoped for a solution in icecast, because I already have installed an apache on this system.
Does anyone have another idea for this "problem"? _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Mar 04, 2011 2:53 pm Post subject: |
|
|
might be worth adding that sort of capability, a mount specific option to redirect to another location eg
<mount>
<mount-name>/old-mountpoint</mount-name>
<redirect>http://......</redirect>
</mount>
karl. |
|
| Back to top |
|
 |
m3gab0y
Joined: 15 Aug 2009 Posts: 47 Location: London, UK
|
Posted: Sat Mar 05, 2011 9:49 pm Post subject: |
|
|
| karlH wrote: |
might be worth adding that sort of capability, a mount specific option to redirect to another location eg
<mount>
<mount-name>/old-mountpoint</mount-name>
<redirect>http://......</redirect>
</mount>
karl. |
it'll be a GREAT idea to add this when the mount is FULL, as currently there is "fallback", it's gonna be just perfect if you add redirect option when the mount is "full" and keep the fallback mount when the source drops. |
|
| Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Mon Mar 07, 2011 10:01 am Post subject: |
|
|
Hi Karlh,
thank you for your hint.
I tried to do such a mount, but unfortunately it did not work.
Does it only work in your kh-tree?
I am currently using icecast 2.3.2 _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
| Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Tue Mar 08, 2011 11:38 am Post subject: |
|
|
Hi karlH,
I am sorry for my misunderstanding.
It would be great if this feature will exist in a furture release if Icecast (2.3.3 ?) or in a future kh-tree.
Kind regards
Johnny _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
| Back to top |
|
 |
|