2013-02-15 59 views
0

目標:將多站點WordPress安裝移至本地主機wordpress重定向多站點無法正常工作

環境:Ubuntu 10.4上的LAMPP。

我正在將mutlisite wordpress安裝到localhost。我已完成的步驟:

使用備份sql文件重新創建數據庫。 從服務器複製所有文件夾和文件並保存在htdocs下。 現在用新生成的wp-config.php文件,當我試圖安裝一個mutlisite,有人問我以下內容添加到WP-config.php文件

define('MULTISITE', true); 
define('SUBDOMAIN_INSTALL', false); 
define('DOMAIN_CURRENT_SITE', 'localhost/wordpress'); 
define('PATH_CURRENT_SITE', '/wordpress/'); 
define('SITE_ID_CURRENT_SITE', 1); 
define('BLOG_ID_CURRENT_SITE', 1); 

我還增加了在.htaccess如下:

RewriteEngine On 
RewriteBase /wordpress/ 
RewriteRule ^index\.php$ - [L] 

# add a trailing slash to /wp-admin 
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
RewriteRule . index.php [L] 

當我訪問我的網站的URL http://localhost/wordpress,我被帶到http://localhost/wordpress/wordpress/,並得到錯誤信息,說明Firefox has detected that the server is redirecting the request for this address in a way that will never complete

請幫我設置正確。

PS:我是新來的Wordpress。

回答

0

這些線

define('DOMAIN_CURRENT_SITE', 'localhost/wordpress'); 
define('PATH_CURRENT_SITE', '/wordpress/');` 

必須是:

define('DOMAIN_CURRENT_SITE', 'localhost'); 
define('PATH_CURRENT_SITE', '/wordpress/'); 
+0

感謝您的答覆。問題是我沒有把'/ opt/lampp/htdocs'中的所有文件保存在'/ opt/lampp/htdocs/wordpress /'中。我想用他的子目錄'wordpress'作爲我的基地。無論如何,因爲我沒有得到任何來自wordpress論壇的幫助,我會嘗試你的解決方案。再次感謝。 – Srihari 2013-02-15 13:19:30

相關問題