System of real estate sites and redirection to each domain pointed

Asked

Viewed 192 times

2

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

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

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

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

I’m waiting for help!

  • But I need to mask an address in the url as I do? Just mask. Don’t necessarily redirect.

  • It’s already improved a lot. Probably in your case, it’s the other way around, you should make your server meet the client’s domain. So, all 80 domains will fall on your site, but by PHP you can read which one is, to know how to filter in DB.

  • Yes, but when I pass the mouse cursor over the links is viewed the address of the main domain of the real estate site and not the address of the customer’s site that the internet user is browsing. With this when it is indexed in google the customer site, appears with the link of my site which is the generator of websites. Rsss. How to solve?

  • If you make the type links href="/aluguel.php?imovel=7293866" it is always in the domain that you are already. if you enter by the client’s domain, you will continue in the customer’s. But it’ll all be your same site, just changes the address.

  • i mask the domain using FRAME.In this case the frame works partly because the address is always static www.novosite.com.br regardless of the link I click. When google does the indexing shows the damage that is href="siteprincipal/rental.php? imovel=7293866 or href="siteprincipal/rental-season.php? imovel=7293866 or href="main site/sale.php? imovel=7293866. Being the main site is the site creator of websites. Rss

  • Forget the frame, this is just problem. By making the same site meet various domains, no need to improvise. It’s the same Phps, but the dominions.

  • Just generate a virtualhost, if you use Apache, for each new domain you create. Of course you must have common sense and know the limits of the server hardware. For example, 100 websites on a single server gets pretty heavy depending on the volume of data. You’ll need a VPS or a dedicated one with good hardware features.

  • 1

    You are offering a reward on a question with answer already accepted?

  • @Marcoauréliodeleu by the comment on the bonus, must be for the answer accepted even.

Show 5 more comments

1 answer

5


You can use only one directory and make a change, but in it you should check 2 things:

First of all you will need to take the URL that your customer used to access the site and make the following checks:

The customer has domain, but has no right to carry it?

In this second step you should get the URL that the client is trying to access, and in this case you should show a page of "we’re not working yet".

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

In this case the page will respond to your server and your server should show the client’s website.

The difficulty will be how you can do this check in the database and how complicated you are in doing the site(just supposing) id=73646 answer for www.sitedocliente.com. But all this is a DNS configuration that you will need to do in conjunction with your PHP and Mysql.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.