Configuring vnext to run in a sub-directory

Hiya,

For one of our servers, I have diligently followed this guide to set up vnext: Setting Up the Backend for M-Files Web and Web-Based Add-Ins (September '22 Update and Earlier)

It should be noted that we run, and will continue to run, rpc over http proxy for some M-Files clients until moved manually.

We have opted to put the vnext web inside a sub-application called vnext under the default website, as per the guide, and so far so good, most of it works.

However, I cannot seem to get the /vnext/link/ part to work, as all the resources on that page use an absolute URL, and hence, all scripts and styling is gone.

We also have a separate issue when authenticating for the first time, it redirects to /vnext#code=231312312312, which is not caught by the rewrite rule supplied by the guide.

Best regards

//Fred_

Parents Reply
  • Good pointer. For the M-Files root site (the classic one in this instance) I added in a redirect rule to always ensure a trailing slash on /vnext like this:

    <configuration>
      <system.webServer>
        <rewrite>
          <rules>
            <rule name="Append trailing slash to /vnext" stopProcessing="true">
              <match url="^vnext$" />
              <conditions>
                <add input="{REQUEST_URI}" pattern="/vnext$" />
              </conditions>
              <action type="Redirect" url="/vnext/" redirectType="Permanent" />
            </rule>
          </rules>
        </rewrite>
      </system.webServer>
    </configuration>
    

    Then after authentication, iis redirects the /vnext#code to /vnext/#code and all is well. This does not fix the issue with the new M-Files weblink however, as that page still uses absolute paths to resources, and hence, tries to get scripts and styles from / instead of /vnext.

Children