|
启用WP3.0的多站点功能,要重写伪静态,按照WP的要求是将.htaccess修改为如下:[ol]RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]# uploaded filesRewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]# add a trailing slash to /wp-adminRewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^ - [L]RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]RewriteRule . index.php [L][/ol]复制代码找到了在lighttpd下使用WP MU时的重写规则,如下[ol]url.rewrite-once = ("^/(.*/)?files/$" => "/index.php","^/(.*/)?files/(.*)" => "/wp-includes/ms-files.php?file=$2","^(/wp-admin/.*)" => "$1","^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2","^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "/$2",)[/ol]复制代码直接套用在WP3.0中,可以开启多站点功能并建立子站点,但是通过子站点上传的附件如图片等不能访问(主站一切正常),我想是不是上边的lighttpd规则不完善的问题,请教各位。 |
|