URL-Rewrite for RD WebaccessRSS

8 replies

Last post Nov 24, 2020 09:36 PM by Krischa84

‹ Previous Thread|Next Thread ›
  • URL-Rewrite for RD Webaccess

    Nov 12, 2020 10:22 AM|Krischa84|LINK

    Hello,

    is it possible to shorten the full URL of an RD Webaccess with URL-Rewrite? 

    https://mydomain.com/RDWeb/Pages/en-US/default.aspx  to https://mydomain.com or https://mydomain.com/default.aspx

    I am new to IIS and URL-Rewrite and i tryed this (https://forum.iis.net/t/1184035.aspx) but i could only remove 1 folder from the domain. It would be nice, if someone can help me.

    Thank you

  • Re: URL-Rewrite for RD Webaccess

    Nov 13, 2020 07:51 AM|Jalpa Panchal|LINK

    Hi,

    You could try to use below rule to implement your requirement:

      <rewrite>
                <rules>  
                    <rule name="RemoveStorename" stopProcessing="true">
                        <match url="^RDWeb/Pages/en-US$|^RDWeb/Pages/en-US/(.*)$" />
                        <conditions>
                        </conditions>
                        <action type="Redirect" url="{R:1}" />
                    </rule>
                    <rule name="RewriteToFile">
                        <match url="^(?!RDWeb/Pages/en-US/)(.*)" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="RDWeb/Pages/en-US/{R:1}" />
                    </rule>
                </rules>
            </rewrite>

    Regards,

    Jalpa

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: URL-Rewrite for RD Webaccess

    Nov 13, 2020 09:34 AM|Krischa84|LINK

    Hi Jalpa,

    i have implement your rule and it shorten the url the right way, but now the iis throws an Error "HTTP Error 403.18 - Forbidden". I don't know what is going wrong. 

    https://ibb.co/ByVs2tH

    Best regards

  • Re: URL-Rewrite for RD Webaccess

    Nov 13, 2020 09:41 AM|Jalpa Panchal|LINK

    look like the rule is conflicting with your API. are you using rd web access through a reverse proxy? 

    you can upload an image on this site and share the link in post :

    https://imgur.com/upload

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: URL-Rewrite for RD Webaccess

    Nov 13, 2020 10:12 AM|Krischa84|LINK

    Hi,

    there is no proxy. I have the standard installation on the IIS and Remote Web Server.

    Best regards

  • Re: URL-Rewrite for RD Webaccess

    Nov 18, 2020 09:28 AM|Jalpa Panchal|LINK

    Hi,

    Could you try to disable the second rule and browse the site gain? also, run failed request tracing to get more detail about the URL rewrite rule:

    https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: URL-Rewrite for RD Webaccess

    Nov 18, 2020 05:01 PM|Krischa84|LINK

    Hi, 

    i disabled the second rule and got another error.

    https://imgur.com/a/uo1EWB7

    I have setup the failed request tracing but the log is empty. Is it because the RDWEB is not in the "C:\inetpup\wwwroot"? Per default the Page is in "C:\Windows\Web\RDWeb\".

    Best regards

  • Re: URL-Rewrite for RD Webaccess

    Nov 19, 2020 08:31 AM|Jalpa Panchal|LINK

    Could you please share the failed request tracing log with enabling both the rule? and which application pool identity and authentication method you are using? 

    try to assign the iusr and iis_iusrs permission to the C:\Windows\Web\RDWeb\ folder.

    Krischa84

    I have setup the failed request tracing but the log is empty.

    For this issue make sure you have checked the enable button in failed request tracing as shown below:

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: URL-Rewrite for RD Webaccess

    Nov 24, 2020 09:36 PM|Krischa84|LINK

    Hi,

    sorry for my late anwser. I was able to create the log files.

    https://file.io/qulhgWO86Oig

    Adding the iusr and iis_isers to the RDWeb-Forlder does not work. 

    Here is the setting of the Application.

    https://imgur.com/a/aEboR0p

    Best regards

‹ Previous Thread|Next Thread ›