1
nghia
Domain name related question
  • 2006/5/10 2:16

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


Dear all,
I have a question related to Domain name and would like to have support from you all.

My site is http://ria1.org , the site can also be accessed from http://ria1.mofi.gov.vn (the site has 2 domain. I have istalled XOOPS with the ria1.org as original domain.

When I access the site from http://ria1.mofi.gov.vn it is OK in the main page, the link on browser show exactly http://ria1.mofi.gov.vn. But when I click to one module, News for example, the link in browser's shown: http://www.ria1.org/modules/news/ not as: http://www.ria1.mofi.gov.vn/modules/news/

I want that: when people access the site from ria1.org, everything after will start with http://www.ria.org/ ....and so on.
And when people access the site from ria1.mofi.gov.vn the thing appear on the browser wil be: http://ria1.mofi.gov.vn/ ....and so on

So any one can help me to solve the issue

2
wtravel
Re: Domain name related question

Can you check in your mainfile.php which url is stated there for XOOPS_URL?

3
nghia
Re: Domain name related question
  • 2006/5/10 6:39

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


Thank you very much for your reply,
I have check and see that:

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://www.ria1.org');
define('XOOPS_URL', 'http://www.ria1.org');


But my question is when people access the site from ria1.org, everything after will start with http://www.ria.org/ ....and so on.
And when people access the site from ria1.mofi.gov.vn the thing appear on the browser wil be: http://ria1.mofi.gov.vn/ ....and so on

How can I edit the main file.

Thanks a lot,


Nghia

4
xuser
Re: Domain name related question
  • 2006/5/10 9:05

  • xuser

  • Just popping in

  • Posts: 73

  • Since: 2002/11/26


define the different XOOPS_URL according to the different incoming $_SERVER["REQUEST_URI"]

5
nghia
Re: Domain name related question
  • 2006/5/10 12:13

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


Thanks,

But I dont know anything about coding. Can you tell me what is the code and where to put it in.

Thanks a lot, Nghia

6
xuser
Re: Domain name related question
  • 2006/5/11 8:21

  • xuser

  • Just popping in

  • Posts: 73

  • Since: 2002/11/26


in the mainfile.php

replace the original line
Quote:

deinfe("XOOPS_URL","http://yoursite.com")

with

Quote:

if(strstr($_SERVER["REQUEST_URI"],"yoursite.com"))
{
deinfe("XOOPS_URL","http://yoursite.com")
}
else if(strstr($_SERVER["REQUEST_URI"],"yoursite2.com"))
{
deinfe("XOOPS_URL","http://yoursite2.com")
}

not verified, hope it work

7
nghia
Re: Domain name related question
  • 2006/5/11 10:49

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


Dear Xuser,
Thank you very much but it still not work.

My original code of that part is:

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://www.ria1.org');
define('XOOPS_URL', 'http://www.ria1.org');

As your suggestion I change to:

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: if(strstr($_SERVER["REQUEST_URI"],"http://ria1.org"))
{
deinfe("XOOPS_URL","http://ria1.org")
}
else if(strstr($_SERVER["REQUEST_URI"],"http://ria1.mofi.gov.vn"))
{
deinfe("XOOPS_URL","http://ria1.mofi.gov.vn")
}

But it not work and have an error:

Parse error: parse error in D:\hshome\acc257\ria1.org\mainfile.php on line 41

Can you help me to solve this problem.
Thanks a lot, Nghia

8
Lance_
Re: Domain name related question
  • 2006/5/11 13:06

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


You might want to spell "define" correctly.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

9
nghia
Re: Domain name related question
  • 2006/5/11 13:56

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


Oh I sorry about the word.

I have done things you suggest, now the site runs but still not like what I want.
When I type: http://ria1.mofi.gov.vn the main page is open, and the browser show exactly http://ria1.mofi.gov.vn. But then when I click to News (in the main manu of the main page) the page open is not: http://ria1.mofi.gov.vn/modules/news (I want this!!!)
It showed: http://www.ria1.org/modules/news
Can you again think of it for me.

Thanks a lot, Nghia

10
nghia
Re: Domain name related question
  • 2006/5/11 14:01

  • nghia

  • Just popping in

  • Posts: 20

  • Since: 2005/1/23


No, not like thing I just post. It error again:
"Parse error: parse error in D:\hshome\acc257\ria1.org\mainfile.php on line 41"
It work because I upload a original mainfile.php.

, Nghia

Login

Who's Online

430 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 430


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