Connecting pages together

Routing

Mame's routing allows you to built nice URLs, even with sub-folders.

Internal Routing and page files in Mame

The basic internal routing in mame is quite easily explained. When you for example create a page with an alias contact, it results in a contact.html file (for download or deployment). And if you link from your homepage to it the link is just "/contact.html".

So as long as you want all files in the same top folder, the routing in Mame is straight forward and easy. But when you look at the URL of this site (documentation/routing), this is quite a bit more sophisticated. That is because aliases support slashes ("/") in it. And for every / a sub folder is created. So this page HTML file is actually in two sub folders (documentation and in then routing) and in this folder it's the index.html. This allows for URLs without the .html suffix and that without any server software extensions, like mod_rewrite for Apache.

That leaves the question on how the documentation page ("/documentation") alias is working, as the documentation is not below a sub-folder. For this special case mame offers a workaround, just add /index to the end of your alias (e.g. documentation/index).

  • /index.html -> home (or any other alias, the default page is what matters)
  • /contact.html -> contact
  • /documentation/index.html -> documentation/index
  • /documentation/routing/index.html -> documentation/routing

Any other Questions?

Don't hesitate to contact us, we are keen to hear your feedback and opinions!

Newsletter

You can unsubscribe at any time. For information about our privacy practices, please check the privacy policy.
Made with ❤ and Mame in the European Union.
Copyright (C) 2019 - 2021 mame.app. All Rights reserved.