PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → One website with multiple domains?
One website with multiple domains?
Iniciado por guest, 19,oct. 2017 11:34 - 4 respuestas
Publicado el 19,octubre 2017 - 11:34
Good morning all. I currently have 6 websites that I am rewriting in WB. It would be a good idea if they were all one and controlled using a database, so I am using a Dynamic AWP site.

Is it possible to have multiple Index pages with each one accessed by a different domain name?

Once that index page has been launched the other sites will be almost identical and any variations controlled by the back end database.

Many thanks

John
Publicado el 19,octubre 2017 - 12:16
Hi John

yes, it's possible... I'm doing it for all my websites (fabriceharari.com, datatale.com, wxshowroom.com) and it doesn't matter if they are the same or not).

The principle I'm using is:
- in the project init code, I'm looking at the URL used to access the site
- I then extract the domain name
- I look in my DB for the matching record. It gives me the index page to open
- I open that page

I'm sharing the BD and SOME pages between web sites (some pages are specific to one site)
The menu is DB driven.
Many presentation elements (logos, colors, etc) are DB driven also.
And of course all content is in the DB.

All the DB elements are site/domain connected -IF NEEDED-

Best regards
Publicado el 19,octubre 2017 - 12:58
Perfect! Exactly what I want to do. So just being really lazy (sorry), how do you get the URL they used to access the site. Sorry it's probably very obvious.
Publicado el 19,octubre 2017 - 14:00
Hi

If I remember correctly, it was quite finicky to setup...

I had to use SysEnvironnement in the project init code, as the pageaddress function is not yet working in that part of the code

Best regards
Publicado el 19,octubre 2017 - 14:29
Thank you Fabrice. I will have a play.