Integrate your website

Passing static content is rather boring. Using FIT in front of your own website is where the fun begins. Let’s integrate a real website. In the following, we will be using the site Replace “” with the host name of your own website if you like.

For this example, we extend the example project _default.

In the following, all non-absolute file paths are relative to the default site’s base directory, that is ~/fit14-devbox/projects/_default/sites/_default/.

First, you have to allow FIT to load data from the origin server. Therefore, create an ACL file conf/acl.xml that grants access to the remote host:

  <allow url="//" />

Next, you need to enhance the URL map in conf/urlmap.xml to get nice and readable URLs. Here, we map the remote server to our local / path whereas local files of the public folder are now accessible via /local/:

  <map path="/local/" source="fit://site/public/" />
  <map path="/" source="//" />

The sources configuration in conf/sources.xml is used to modify requests sent to the origin. Pass the origin headers with the keyword auto.

If the origin website relies on cookies, you probably want to pass cookies in transparent mode:

  <source host="">
    <headers pass="_auto_" />
    <cookies mode="transparent" />

Point your browser to the FIT server at and look at the result: The origin website is now loaded via FIT.

AJAX compatibility

If you use AJAX to load HTML fragments, you should enable automatic fragment handling:


Next: Upgrade your website