FAQ  •  Register  •  Login

Serviio IIS rewrite Issue

<<

heuby

Serviio newbie

Posts: 15

Joined: Tue Jul 24, 2012 7:24 pm

Post Mon Jan 15, 2018 7:56 pm

Serviio IIS rewrite Issue

I have an IIS Webserver that act as proxy.
On the IIS I have define a website "serviio.mydyndns.org". On this site I have defined the following rewrite rule:

  Code:
<rewrite>
            <rules>
                <rule name="Reverse Proxy to Serviio mediabrowser" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" negate="false" />
                    <action type="Rewrite" url="http://localhost:23424/{R:0}" appendQueryString="true" logRewrittenUrl="false" />
                    <serverVariables>
                    </serverVariables>
                </rule>               
            </rules>
        </rewrite>


This works quite well. I can access the site by enter "https://serviio.mydyndns.org/mediabrowser". After this can enter the password an I'm logged in.
Now I can click to "pictures", "folders", "MyPictures" or "pictures", "year", "2017".
It works until click on "folders" or "year", but when I click on the folder "MyPictures" or "2017" I receive the message "Unknown server error (400, undefined)".

The access to the mediabrowser in the local network works without any issue.

Have someone an idea what I made wrong?

Thank you for any help.
<<

heuby

Serviio newbie

Posts: 15

Joined: Tue Jul 24, 2012 7:24 pm

Post Wed Jan 17, 2018 3:22 pm

Re: Serviio IIS rewrite Issue

I think I have found the issue why it doesn't works, but I cannot find a solution for it.

I have enabled the "rewrite looging" and have foung the following entries:

Works:
  Code:
2018-01-17 15:07:19 192.168.69.12 GET /cds/browse/html5/I_F/BrowseDirectChildren/all/1/18 ignoreContentOnlyPresentationSettings=true........


Not Works:
  Code:
2018-01-17 15:07:21 192.168.69.12 GET /cds/browse/html5/I_F^FOL*R2/BrowseDirectChildren/all/0/18 ignoreContentOnlyPresentationSettings=true.......



I Think the problem is that IIS cannot rewrite Character (^) or (*). Then when I change https://serviio.mydyndns.org" to "http://localhost:23424" it works.
Is there a way to give the IIS rewriter a hint to rewrite it correct?
<<

heuby

Serviio newbie

Posts: 15

Joined: Tue Jul 24, 2012 7:24 pm

Post Sun Jun 03, 2018 6:59 am

Re: Serviio IIS rewrite Issue

I have debug the webpage and after additional investigastions I have find out where the problem is.

* (asterisk) is a dangerous character in the view of IIS.
But, you can allow it when adding this line of the config:

<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" />

  Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <customErrors mode="Off" />
        <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" />
    </system.web>


Now all works how excepted :D

Return to Serviio Support & Help

Who is online

Users browsing this forum: Google [Bot] and 87 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.