5 Replies Latest reply on May 1, 2017 8:52 PM by user19752

    URL Rewrite Question FM 15

    mattdenton

      Hi - we're just trying to make it easier for our users to land on the correct address for WebDirect and not have a blank page served at the web root. In other words, if they go to the web root, it would redirect/rewrite to the WebDirect page on the same server. We're doing this now on our FM Pro 11 server with a redirect http page, but Server 15 is configured differently enough that nothing I've tried has worked to redirect someone landing at https://the.server.name > https://the.server.name/fmi/webd, even with the rewrite module.

       

      Has anyone successfully done this with IIS7 and FileMaker Server 15? Thanks in advance!

       

      Matt

        • 1. Re: URL Rewrite Question FM 15
          user19752

          With default install, web root is not blank page. It is "C:\Program Files\FileMaker\FileMaker Server\HTTPServer\conf\index.html"

          Then I can redirect adding

          <meta http-equiv="refresh" content="15; URL=/fmi/webd">

          in the header section of the file.

           

          How did you try it?

          • 2. Re: URL Rewrite Question FM 15
            mrtechguy

            Don't know what you installed on but I have now tested this on 3 different virtual servers and the web page on the default install going to  http://name-of.server.domain comes up as a blank page %100 Just as the OP stated!!

             

            This was driving me nuts as well! If you typed in http://name-of.server.domain/index.html this would load properly but without manually typing in the index.html the web server loads a blank page. If you typed in http://name-of.server.domain/index.html this would load the test page properly but without manually typing in the index.html the web server loads a blank page. So HTTP redirect like FM11 was looking out

             

            Also, if you call in for support don't let someone at FileMaker fool you into telling you this is a known issue with IIS and blank pages! When googling this error, it was having to do with the "Static Content" role on Windows not being installed. Mine had the role installed! (By FileMaker Installer I believe.)

             

            However, after 2 days of messing around, I have found the fix to this issue. you can fix it 2 ways thru the IIS GUI (don't know how to do yet) or thru the web.config Don't worry though It's easy to do this in the web.config file.

             

             

            1. Save a copy of the original web.config in the folder "C:\Program Files\FileMaker\FileMaker Server\HTTPServer\conf"

             

            2. Open web.config with notepad and at the top of the config file look for these lines:

             

            <?xml version="1.0" encoding="UTF-8"?>

            <configuration>

              <system.webServer>

                <rewrite>

                  <rules>

                    <clear />

                    <rule name="standby_http" enabled="false" stopProcessing="false">

                      <match url="^hss(/(.*))?" negate="true" />

                      <conditions>

                        <add input="{HTTPS}" pattern="off" />

                      </conditions>

                      <action type="Redirect" url="http://{PRIMARY}:{SERVER_PORT}{REQUEST_URI}" />

                    </rule>

             

            3. Just below the  <clear /> line, insert the following lines:

             

                          <rule name="Redirect Root Dir" stopProcessing="true">

                                <match url="^$" />

                                <action type="Redirect" url="/fmi/webd" />

                              </rule>

             

             

            4. The file config code should look like this toward the top of the file, notice the lines I have added in Red Bold. I would try to match the formatting of the tabs and spacing to match the rules below this new one you are creating. Don't forget to safe the file!!

             

            <?xml version="1.0" encoding="UTF-8"?>

            <configuration>

              <system.webServer>

                <rewrite>

                  <rules>

                    <clear />

                   <rule name="Redirect Root Dir" stopProcessing="true">

                      <match url="^$" />

                      <action type="Redirect" url="/fmi/webd" />

                    </rule>

                    <rule name="standby_http" enabled="false" stopProcessing="false">

                      <match url="^hss(/(.*))?" negate="true" />

                      <conditions>

                        <add input="{HTTPS}" pattern="off" />

                      </conditions>

                      <action type="Redirect" url="http://{PRIMARY}:{SERVER_PORT}{REQUEST_URI}" />

                    </rule>

             

            5. Now the final steps! On Windows Server open an elevated command prompt and type "iisreset" without the quotes, this will restart the web server and 5 seconds later you should now open your web browser to go to http://name-of.server.domain and it will automatically redirect to http://name-of.server.domain/fmi/webd!

            • 3. Re: URL Rewrite Question FM 15
              user19752

              Ouch, my IIS maybe not "default" since I forgot to remove it when upgrade from FMS14.

               

              You need "default document" (and "error page").

              This is document for old IIS but usable.

              Configuring Default Documents in IIS 7

              • 4. Re: URL Rewrite Question FM 15
                mrtechguy

                Dude, stop replying with erroneous information! The way Filemaker installs the site in IIS, "default document" is even an option!!

                 

                Screen Shot 2017-05-01 at 7.39.58 PM.png

                • 5. Re: URL Rewrite Question FM 15
                  user19752

                  It looks I wrote too short.

                   

                  My mistake maybe I thought my IIS is "default". It is not clean installation with FMS15, same server had FMS14 and I cleaned it before install FMS15, but didn't for IIS. (I can't confirm it now but can believe you)

                   

                  A way to show index.html without filename in URL is installing "Default Document" feature on IIS. This enable old way that OP might use for redirect.

                  (But what OP need is how to redirect, so using redirect module is straightforward)

                   

                  And as you saw (that not saw anything rather than blank page), you need "Error page" feature to see any error on IIS. My server is for testing so this may be the first I did.