2016-01-08 54 views
0

我对同一网站有2个域名。 我需要创建多站点子文件夹。
你能帮助我吗?如何用两个域创建多站点子文件夹? (wordpress)

WP-config.php中

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); 
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); 
    /* Multisite */ 
    define('WP_ALLOW_MULTISITE', true); 
    define('MULTISITE', true); 
    define('SUBDOMAIN_INSTALL', false); 
    define('DOMAIN_CURRENT_SITE', 'mysite.com'); 
    define('PATH_CURRENT_SITE', '/'); 
    define('SITE_ID_CURRENT_SITE', 1); 
    define('BLOG_ID_CURRENT_SITE', 1); 

htaccess的

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
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] 
</IfModule> 

回答

0
In multi site concept. 
    You can create subdomain like this. 

    http://www.google.com/ // this is your main website. 
    http://www.google.com/first 
    http://www.google.com/second. 

    No need to create sub folder for it. theme and plugin folder are same for main domain and subdomain. 
    You can refer this link for understand multisite concept.this is a multisite. 
    https://www.showinmycity.com // main domain 
    https://www.showinmycity.com/events/ // subdomain 
相关问题