An open API service indexing awesome lists of open source software.

https://github.com/zotonic/zotonic_mod_alternative_uris

Zotonic module to define alternative uris for a resource
https://github.com/zotonic/zotonic_mod_alternative_uris

Last synced: about 1 year ago
JSON representation

Zotonic module to define alternative uris for a resource

Awesome Lists containing this project

README

          

# mod_alternative_uris

Define a list of alternative uris for your content.

This adds a `textarea` to the *Advanced* panel in the admin.
Define a list of different urls, paths or hostnames for the content by adding lines to this textarea.

The content of the textarea is processed during the pivot of the resource. This means that it might take a couple of minutes before the new urls are effective.

Every line is first sanitized using `z_html:sanitize_uri/1` and parsed with `uri_string:parse:/1` before it is inserted. Only the host and path of the parsed alternative uris is taken into account. The protocol, query-string, and fragment (hash) are not used for the dispatch matching.

The alternative uris are matched after matching all configured hosts and/or dispatch rules. This means that any configuration from the site configs, dispatch rules, and resource *page_path* takes precendence.

## Zotonic version

You will need Zotonic version 1.0.0 or later. This because of changes to the *Advanced* admin panel.