0
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 as follows:
ID: 1 | City: Araxá | TAG: araxa | Access: www.siteprincipal.com.br/araxa Ex internal page: www.siteprincipal.com.br/araxa/contact
ID: 2 | City: Uberaba | TAG: Uberaba | Access: www.siteprincipal.com.br/Uberaba Former of internal page: www.siteprincipal.com.br/Uberaba/contact
ID: 3 | City: Ituiutaba | TAG: Ituiutaba | Access: www.siteprincipal.com.br/Tuiutaba Former of internal page: www.siteprincipal.com.br/Ituiutaba/contact
But I want to register and use a specific domain for each city (remembering that everything will be hosted within www.siteprincipal.com.br):
www.dominioaraxa.com.br => Ex de link: www. dominioaraxa.com.br/contact www.dominiouberaba.com.br => Link ex: www. dominiouberaba.com.br/contact www.dominioituiutaba.com.br => Ex de link: www.dominioituiutaba.com.br/contact
SUMMING UP: I want to host the site in the main domain (www.siteprincipal.com.br) but that people can access it by the domain name of each city (dominioaraxa, dominiouberaba, dominioituiutaba, etc...).
Any idea how to do this? By studying and working on HTACCESS and/or working on the DNS of each domain. Someone with experience in this to point the way?
Remembering that redirecting only DOES NOT ANSWER ME, because then the URL will stick to the link of the main site, and I wanted to show in each city the separate domain.
Working with Linux hosting and programming using PHP and Mysql database.
Thank you.
with Laravel you would make easy subdominios.
– Daniel Lemes
http://duvidas.laravel.com.br/forum/07-16-2014-route-group-com-subdominio-menos-para-www?page=1
– Daniel Lemes
.htaccess is the best way. I would go in this option, but since this would be an opinion, I’ll just leave a comment.
– Marcelo Aymone