To Top

FileMaker WebDirect: URL Differences Between 15 And 16

The Problem

The change that FileMaker quietly made between WebDirect versions 15 and 16 was very subtle: they replaced the # symbol with a forward slash.

Here's an example of a URL in WebDirect 15: https://my.server.com/fmi/webd#DATA_FILE

And here's that same URL in WebDirect 16: https://my.server.com/fmi/webd/DATA_FILE

Seemingly not much different, but if you've upgraded to FileMaker Server 16 and you try to use the WebDirect 15 URL, you don't hit the database file directly. Instead, you land on the WebDirect launch page. For users this could be very confusing, and for you as the developer it could be very unwanted behavior.

So, we're going to address this by forwarding the user to the correct URL, but first…

The Other Change To WebDirect

So, not only did FileMaker change the URL, they also changed some of the WebDirect component file structure on the server. In FileMaker 15, if you wanted to adjust the behavior of the WebDirect landing page, you would adjust this file:

FileMaker Server\Web Publishing\publishing–engine\jwpc–tomcat\fmi\VAADIN\themes\default\layouts\iwp_home.html

If you go looking for this on a FileMaker 16 server, you won't find it. FileMaker moved and renamed the WebDirect landing page and you'll now find it here:

FileMaker Server\Web Publishing\publishing-engine\jwpc-tomcat\fmi\VAADIN\launchcenter\home.html

And this is where the big disclaimer comes in: adjusting FileMaker Server files may be harmful to your set up and you should proceed with caution and at your own risk. If you can, try this on a test server first and absolutely make a copy of any file you intend to adjust before making any changes to it.

All that said, let's see how we can forward the user on to the correct URL.

Forward Using Javascript

While there may be a number of ways to approach this, such as playing around with IIS in Windows Server, we're going to use a very simple piece of Javascript to test what the user has in the address bar of their browser. If it matches one of the rules we have set up then we'll forward them on to where they should be. This also means that if you are hosting more than one file on the WebDirect 15 server, we can test for the database file you are trying to access and forward you on to that same file using the correct URL for WebDirect 16.

Below is the Javascript we will use. It's a simple conditional statement saying if the URL is this then make the URL this, else if the URL is this then make the URL that (this can be used for our second database and you could add as many else ifs as you need), else do nothing as we've not met one of the criteria set up above.

Take the code on lines 4-11 and place this right under the tag in the home.html file noted above.

Of course you'll need to adjust the https://my.server.com portion of the URLs as well as the names of the database files you're hosting on your server. And do be very careful not to end up creating a continous loop, where the user gets forwarded to a new URL, which bumps them back to the launch page, which forwards them to the new URL, etc etc.

Summary

This is a seamless and safe way to ensure your users get to the correct database file when upgrading from FileMaker 15 to FileMaker 16, and will save you as the developer plenty of questions and confusion from those users.

Download a copy of the full home.html file below:
home.html demo file

If you have any questions or need help with doing this, don't hesitate to reach out to us.