|
启用WP3.0的多站点功能,要重写伪静态,按照WP的要求是将.htaccess修改为如下:- RewriteEngine On
- RewriteBase /
- RewriteRule ^index\.php$ - [L]
- # uploaded files
- RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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]
复制代码 找到了在lighttpd下使用WP MU时的重写规则,如下- 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",
- )
复制代码 直接套用在WP3.0中,可以开启多站点功能并建立子站点,但是通过子站点上传的附件如图片等不能访问(主站一切正常),我想是不是上边的lighttpd规则不完善的问题,请教各位。 |
|