Wordpress多站点配置
2013-12-05 15:10 斌哥tobin 阅读(366) 评论(0) 编辑 收藏 举报-
编辑wp-config.php,在“好了!请不要再继续编辑。请保存本文件。使用愉快!”这段话上面写入:define('WP_ALLOW_MULTISITE', true);
-
进入WP后台-----工具-----管理网络,选择“子目录”,然后点击 安装
-
然后会进入到“创建一个wordpress站点网络”面板,里面有详细步骤,按照页面说明进行操作
- 完成后会列出一个Apache Rewrite规则,我在网上找了Nginx的Wordpress多站点rewrite规则
location / {
server_name_in_redirect off;
port_in_redirect off;
rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}
}