Page 1 of 1

redirect "/" to "/console"

PostPosted: Sun Jun 07, 2020 2:40 am
by si_blakely
Is there any mechanism that can allow requests to "/" to be redirected automatically to "/console" on port 23423, or could this be added as an enhancement?

I've set up a reverse proxy for http://serviio.local.network, to map http://serviio.local.network/ to http://home.local.network:23423/, but it would be awesome if going to http://serviio.local.network just went straight to the console.

Thanks

Re: redirect "/" to "/console"

PostPosted: Sun Jun 07, 2020 3:22 am
by atc98092
No, there's nothing that can be done from the Serviio side. Web browsers go to where they are pointed, unless redirected by something in between. The reverse proxy is really the only way to do it. And I don't know enough about configuring a reverse proxy to know how to do it. But I have no doubt it could be done.

Naturally, if Serviio only required the port number, and used the root of the web server to go straight to the console, that might be a way to do it within Serviio. But there might be some programmatic reason that it either can't be done, or perhaps it's simply a poor practice for web design. That's a question I can't answer.

Re: redirect "/" to "/console"

PostPosted: Mon Jun 08, 2020 9:24 am
by si_blakely
atc98092 wrote:Naturally, if Serviio only required the port number, and used the root of the web server to go straight to the console, that might be a way to do it within Serviio.

That's pretty much what I am suggesting.

Serviio implements a web server, and has a defined set of valid urls (/console, /rest) that implement specific functionality.

Other urls including "/" return an http 404 status (not found), indicating that it has no specific functionality assigned.

If making a request to "/" returned a HTTP 302 Redirect to "/console/" , it would be solve this issue for web browsers, and I can't really see how it would impact functionality given that nothing is defined there anyhow.

Similarly for the mediabrowser port - requesting "/" could redirect to "/mediabrowser/".

Re: redirect "/" to "/console"

PostPosted: Mon Jun 08, 2020 1:45 pm
by atc98092
Well, as I mentioned there might be some programmatic reason for it. Only Zip could answer that. Since Serviio uses different ports for the console and MB, it seems on paper it could work.

Re: redirect "/" to "/console"

PostPosted: Mon Jun 15, 2020 8:18 pm
by zip
I don't think that would work for a redirect, as the same port is used for the api endpoint.

Re: redirect "/" to "/console"

PostPosted: Tue Jun 30, 2020 9:35 am
by si_blakely
zip wrote:I don't think that would work for a redirect, as the same port is used for the api endpoint.


The API endpoint is /rest - so that would not be impacted by a redirect on "/" to "/console".
All the API requests are explicitly to /rest/..., and rest APIs don't rely on redirect behavior.

It's only browsers that would go to "/", and they are most likely to want to go to /console to display a web page.

It's just a suggestion.