Skip to content
main
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
src
 
 
 
 
 
 
 
 

README.md

Contao Short Link Service (https://to.contao.org)

This repo contains short links related to the Contao Open Source CMS project.

Please note that no pull requests with short links for extensions, commercial products or anything similar will be accepted.

Configuration

All short links have to be added to the redirects.yaml file.

The easiest redirect is a language-independent short link for a longer URL such as:

docs: https://docs.contao.org

This will generate the https://to.contao.org/docs short link and redirect to you https://docs.contao.org.

If you want to have language-dependent redirects, you can configure them like so:

partner:
    en: https://contao.org/en/contao-partners.html
    de: https://contao.org/de/contao-partner.html
    es: https://contao.org/es/partner-contao.html
    fr: https://contao.org/fr/partenaires-contao.html

In this case, the Accept-Language header of the visitor is going to be analyzed, and they are being redirected to the best available option. Note that if there's no match, the first target is going to be selected. So your fallback should always be listed first (most likely en). This also works for extended language keys like de-CH in which case, de is going to be selected.

If you want to force a certain language, you can use https://to.contao.org/partner?lang=fr.

All redirects are 307 Temporary Redirects and cached for 24 hours.

About

Contao Short Link Service (https://to.contao.org)

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

You can’t perform that action at this time.