Real estate site system and redirection for each targeted domain

2

I'm developing a real estate system in which when the user does his registration he gets a basic URL to access his site.

Example: foo.bar/modelo/1/site.php?id=73646

That is, all the files in the real estate system are inside the directory: model / 1 /

However, if I choose to have a domain of my own, I can redirect this foo.bar/modelo/1/site.php?id=73646 address to the new domain pointing, but for this I need to put all the files of the system in this new directory of the domain? Or can I use another technique? Imagine I have 80 clients using the real estate system and if I make an update to a file and have to publish in each of the 80 directories the new updated file, or do I need to modify the template structure?

I look forward to helping you!

    
asked by anonymous 21.12.2015 / 16:48

1 answer

5

You will be able to use only one directory and make a change, but in it you should check 2 things:

First you will need to get the URL that your client used to access the site and make the following checks:

Does the customer have a domain, but do not have the right to upload it?

In this second step you should get the URL that the client is trying to access, in which case you should show a "we are not working" page.

If the URL has DNS and has paid. How to proceed?

In this case the page will respond to your server and your server should show the client site.

The difficulty will be how you can do this check in the Database and how complicated it is to make the site (just assuming) id = 73646 respond by www.sitedocliente.com . But all this is a DNS configuration that you will have to do in conjunction with your PHP and MySQL .

    
05.01.2016 / 05:50