1

I am very new to YII Framework.

My task is to change all the inner links of a site point to another domain. the site developed in YII framework. No need to point the home page, only the inner pages to be point to another domain.

Example:
domain name 1 - www.myfirstdomain.com
domain name 2 - www.myseconddomain.com

The inner pages in the domain name 1 must be point to domain name 2.

Example:
1 - www.myfirstdomain.com/reviews/ must be point to www.myseconddomain.com/reviews/
2 - www.myfirstdomain.com/prices/ must be point to www.myseconddomain.com/prices/

Note - I do not want to use rewrite URL of .htaccess

For this I have to change the baseURL for all links, I do not know how to change it.

I have to finish this task ASAP, please help me.

Thanks a lot.

Senthil
  • 444
  • 1
  • 10
  • 23

2 Answers2

0

try to change the name of your app folder from myfirstdomain to myseconddomain..

or you may try to see protected->config->main.php and look if there is a global parameter there that declares the name of your website..

Vainglory07
  • 5,073
  • 10
  • 43
  • 77
  • thanks for your quick reply. I tried below URL, but it's not work http://stackoverflow.com/questions/7613335/how-to-set-base-url-in-yii-framework . Also in main.php, it has thename as 'xxxx' ('name'=>'xxxx',). Being a beginner I don't know where is the app folder. Also both domains in different server. Please give some more suggestions. Thanks. – Senthil Dec 14 '12 at 07:27
  • the app folder im telling you is the folder of your website as is..try to change it – Vainglory07 Dec 14 '12 at 07:30
  • Please note both site is in different server, also the home page must be load from first domain. ONLY the inner pages (home page links) could be point to other domain. Also I tried to change the baseUrl in main.php and config.inc.php, but it's not working. – Senthil Dec 14 '12 at 07:38
0

Note - I do not want to use rewrite URL of .htaccess

Why not?

This is the simplest solution.

What is the difference between the domains? Yii will work on any domain controllers if the same. Changes because only the domain name. Or you have the code uses absolute paths?

bluish
  • 26,356
  • 27
  • 122
  • 180
Artem
  • 101
  • 1