I wanted a light for the following situation:
I have a main website (online guide) www.siteprincipal.com.br. In this site I have a table of cities where I register each one and I show the content in the following way:
ID: 1 | Location: United States | TAG: araxa | Access: www.siteprincipal.com.br/araxa Ex of internal page: www.siteprincipal.com.br/araxa/contato
ID: 2 | City: Uberaba | TAG: Uberaba | Access: www.siteprincipal.com.br/uberaba Ex of internal page: www.siteprincipal.com.br/uberaba/contato
ID: 3 | City: Ituiutaba | TAG: Ituiutaba | Access: www.siteprincipal.com.br/ituiutaba Ex of internal page: www.siteprincipal.com.br/ituiutaba/contato
However, I want to register and use a specific domain for each city like this (remembering that everything will be hosted inside www.siteprincipal.com.br):
www.dominioaraxa.com.br = > Ex of link: www. domainaraxa.com.br/contact www.dominiouberaba.com.br = > Ex of link: www. dominiouberaba.com.br/contact www.dominioituiutaba.com.br = > Ex link: www.dominioituiutaba.com.br/contato
SUMMARY: I want to host the site in the main domain (www.siteprincipal.com.br) but that people can access it through the domain with the name of each city (domainaraxa, dominiouberaba, dominioituiutaba, etc ...) p>
Any ideas how to do this? If studying and manipulating HTACCESS and / or manipulating the DNS of each domain. Anyone with experience in this to point a path?
Remembering that redirect only DOES NOT ANSWER me, because there the URL will get the main site link, and I wanted it to show the separate domain in each city.
Working with Linux hosting and programming using PHP and MySQL database.
Thank you.