Example Use Cases

You would probably need .forgerc file on your site if you want to reuse pages across different URLs or you want better looking links. This can be achieved with Redirect/Rewrite rules. E.g.:

Location /our-team
    Rewrite /our-team.html

We imagine you'd want to give a link to your site with terms and conditions. You're too busy at the moment to design specific page, so instead just redirect users to a Google Doc (replace it with your own page, the link will remain the same!).

Location /terms
    Redirect https://docs.google.com/document/d/1_n1_oiyk0b3x7i69n-iAh4f0UmFbvA 302

You don't even need a page, you can write a quick text placeholder directly in the config file:

Location /terms
    Respond "Oops! Not ready yet, stay tuned." 200

Use NotFound condition if you want to display custom 404 page (Forge already supports 404.html out of box, but say you need another name).

NotFound
    Rewrite /my-custom-404.html

This condition is also useful if you have a single-page application with pushState routing, common in React.js, Vue.js, Angular and many other modern javascript frameworks. In order to make your app work when it refreshes, you need to respond with index.html on any unknown request.

NotFound
    Rewrite /index.html