Skip to content

URL selector [deprecated]

João Pimentel Ferreira edited this page Oct 14, 2022 · 1 revision

This information is mostly deprecated, since from October 2022, due to cost control, all countries will be using only the host autocosts.info.

This website has several domains associated with it, having a TLD extension of .info or the respective country code (ccTLD) and a test version with a TLD extension of .dev. The server side code shall thus forward the page if the entry URL is not correctly typed according to the domain name vs. country code combinatorial rules.

Terminology

protocol://username:password@hostname:port/pathname?search#hash
-----------------------------href------------------------------
                             -----host----
-----------      origin      -------------

Flowchart

Procedure

  • The domain is entered in the format http[s]//domainName/cc or simply http[s]//domainName
  • For a specific Country Code (CC) there is only one single valid combination
  • When for a specific Country there is a domain with a ccTLD, the URL shall be simply http[s]//domainName (ex: autocustos.pt)
  • When for a specific Country there is no domain with a ccTLD, the URL shall be http[s]//domainName/cc (example http[s]//autocosts.info/ar, http[s]//autocosts.info/co or http[s]//autocustos.info/br).

When user inputs domainName/cc

  • If the domain name (domainName, ex: 'autocustos.info') and Country Code (ex: 'br') combination is valid renders the page, if not redirect to the URL corresponding to the valid combination, considering the Country Code

When user inputs domainName

  • If the name (ex: autocosti) of domain (ex: autocosti.info) is recognised (belongs to a known host) and associated with only one host (IT:autocosti.it) forward to said host. Thus forward autocosti.info => autocosti.it
  • If the name (ex:autocustos) of domain (ex:autocustos.info) is recognised but associated with more than one country (ex: PT:autocustos.pt and BR:autocustos.info) forward according to locale. Thus autocustos.info forwards according to locale
  • Forwards according to locale in any other situation
Clone this wiki locally