2009-02-27 56 views
0

我在本地主機下的子目錄「joomla」上創建了我的網站。現在我已經將此網站移植到我的託管服務器下的另一個子目錄「testing」中。這樣一來,每當我的用戶創建的任何菜單項,他們試圖和「的Joomla」文件夾下找到的,而不是「測試」joomla - 如何更改鏈接中的子目錄?

所以鏈接是像http://www.mydomain.com/joomla/articleid=頁面...而不是http://mydomain.com/testing/articleid=後..

我應該在哪個文件中進行此更改以及文件中的哪個位置?我試圖調查configuration.php,但不知道應該在哪裏做出改變。

這只是主頁上使用的菜單問題(我的主頁是自定義頁面)我還注意到主頁不直接訪問/ tests/images文件夾中的圖像。我必須明確地將/ testing添加到圖像src。

謝謝。

回答

2

查看configuration.php文件。有一對夫婦的變量,你必須改變:

在的Joomla 1.0:

$mosConfig_absolute_path = 'C:/webroot/joomla'; 
$mosConfig_cachepath = 'C:/webroot/joomla/cache'; 
$mosConfig_live_site = 'http://localhost/joomla'; 
// change to: 
$mosConfig_absolute_path = '/home/username/www/testing'; 
// of course, use your own path here - find it out with php_info() 
$mosConfig_cachepath = '/home/username/www/testing/cache'; 
$mosConfig_live_site = 'http://www.mydomain.com/testing'; 

在的Joomla 1.5:

var $log_path = '/home/username/www/testing/logs'; 
var $tmp_path = '/home/username/www/testing/tmp'; 
var $live_site = 'http://www.mydomain.com/testing'; 
1

,如果你是要執行此遷移不止一次,我建議使用像joomlapack這樣的備份/遷移工具 - 它可以從本地主機遷移到少於2分鐘的任務。還包括傳輸中的數據庫&模塊/組件。從本地主機中的一個目錄結構到生產中的另一個目錄結構沒有問題。