1
portafolio
To modify mainfile for several domains
  • 2007/1/25 18:53

  • portafolio

  • Just popping in

  • Posts: 7

  • Since: 2007/1/25


Good afternoon community to request their kind collaboration for the following thing: it is that there is a web that you this implementing with Xoops, and the client has two domains pointing to the same Hosting that is to say to the same one you/he/she paginates web of Xoops, but I eat most they will taste when installing XOOPS in the file mainfile.php but or less in you/he/she lines her 39 this the code that defines the url of XOOPS

it defines ('XOOPS_URL', 'http://www.dominioXXX1.com');

Bony that if one writes in the bar of addresses http://www.dominioXXX1.com you leave the it paginates and if http://www.dominioXXX2.com writes you also leave with it paginates it home, there is not problem it is visualized the it paginates and in the bar of addresses you also leave the name of each mentioned domain; but the client wants that the domain name for the one that you entrance to the web always stays visualized in the bar of addresses, thing that doesn't happen because when making click in any connection he/she spends automatically to it paginates it that this designated in XOOPS URL in the case of the example http://www.dominioXXX1.com and alone http://www.dominioXXX2.com he/she would stay visible in it paginates it home

Somebody knows that code you can add or to modify so that the domain for which I enter the user stays visible in the bar of addresses always.

Ahead of time thank you

my language is Spanish, excuse

2
wodnick
Re: To modify mainfile for several domains
  • 2007/1/25 20:55

  • wodnick

  • Just popping in

  • Posts: 32

  • Since: 2006/12/30


Hi there!

I'm not quite sure what U want to achieve, but if changing this definition "on the fly" - this can by made by code like this:

#39 : define('XOOPS_URL', 'http://www.dominioXXX1.com');

change to:

if($_SERVER['SERVER_NAME']=="www.dominioXXX1.com")
{
define('XOOPS_URL', 'http://www.dominioXXX1.com');
}
else
{
define('XOOPS_URL', 'http://www.dominioXXX2.com');
}

In this case, http://www.dominioXXX2.com is default value.

Hope this help U.

regards,
wodnick
========
Pozycjonowanie

3
portafolio
Re: To modify mainfile for several domains
  • 2007/1/25 22:15

  • portafolio

  • Just popping in

  • Posts: 7

  • Since: 2007/1/25


thank you for the help, but the scrit it doesn't work me, he/she always stays in the second option it modifies this way it:

......
}
else
{
define('XOOPS_URL', 'http://www.dominioXXX2.com');
}

I also place the forum in Spanish for if somebody understands:

Buenas Tardes comunidad para pedir su amable colaboración para lo siguiente: resulta que hay una web que se esta implementando con Xoops, y el cliente tiene dos dominios apuntando al mismo Hosting o sea a la misma pagina web de Xoops, pero como la mayoria sabran al instalar XOOPS en el archivo mainfile.php mas o menos en la linea 39 esta el codigo que define el url de Xoops

define('XOOPS_URL', 'http://www.dominioXXX1.com');

Osea que si uno escribe en la barra de direcciones http://www.dominioXXX1.com se ve la pagina y si escribe http://www.dominioXXX2.com tambien se ve con la pagina home, no hay problema se visualiza la pagina y en la barra de direcciones tambien se ve el nombre de cada dominio mencionado; pero el cliente quiere que el nombre de dominio por el que se ingreso a la web se mantenga siempre visualizado en la barra de direcciones, cosa que no pasa porque al hacer clic en cualquier enlace se pasa automáticamente a la pagina que esta designada en XOOPS URL en el caso del ejemplo http://www.dominioXXX1.com y http://www.dominioXXX2.com solo se mantendria visible en la pagina home

Alguien sabe que codigo se puede adicionar o modificar para que el dominio por el que entro el usuario se mantenga visible en la barra de direcciones siempre.

De antemano Muchas gracias

4
Lance_
Re: To modify mainfile for several domains
  • 2007/1/26 0:30

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


If the user wants to open the same site with multiple domains:

define('XOOPS_URL', "http://{$_SERVER['HTTP_HOST']}");

Cheers
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

5
portafolio
Re: To modify mainfile for several domains
  • 2007/1/26 1:34

  • portafolio

  • Just popping in

  • Posts: 7

  • Since: 2007/1/25


Thank you Lance_ but the script always leave me visible the url of one of the domains example "www.dominioXXX1.com" and not for the one that the user enters

6
Lance_
Re: To modify mainfile for several domains
  • 2007/1/26 1:54

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


If the urls within the site are relative, then it should work fine.

Look at this site that is changing their domain, dogmawestcoast.com and ivsanbernard.us. From the menu you will see that the domain remains whatever is used.

Or
kebeklan.com and thelionsden-arena.net.
In this case, both sites have the same content but different themes.

Unless I'm totally off-base with your need.
Cheers.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

7
portafolio
Re: To modify mainfile for several domains
  • 2007/1/26 3:15

  • portafolio

  • Just popping in

  • Posts: 7

  • Since: 2007/1/25


Lance_If the given example is Exactly what I need

thank you Lance_o but the script always leave me visible the url of one of the domains (http://www.madrugon.com), the domains are: http://www.oceanicbeach.com and http://www.madrugon.com
and to the places that I am pointing they are http://www.oceanicbeach.com/oceanB
user and password "oceanB" I proved two script:

Script1:
define('XOOPS_URL', "http://{$_SERVER['HTTP_HOST']}/oceanB");

Script2:
define('XOOPS_URL',"http://{$_SERVER['SERVER_NAME']}/oceanB");

Erase all that of the directory "templates_c" thinking that it could be this, but anything doesn't work me as the example that I index myself

Login

Who's Online

517 user(s) are online (379 user(s) are browsing Support Forums)


Members: 0


Guests: 517


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits