[英]Explanation for custom htaccess line added to old Wordpress multisite install
The following custom htaccess line was added to a wordpress old multisite install.以下自定义 htaccess 行已添加到 wordpress 旧的多站点安装中。 I was wondering if anyone can explain what it is doing.
我想知道是否有人可以解释它在做什么。
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
Original below:原文如下:
# BEGIN WordPress
<IfModule mod_rewrite.c>
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).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
the file wp-includes/ms-files.php is the upload handler for multisites.文件 wp-includes/ms-files.php 是多站点的上传处理程序。
before WP Version 3 this was the method to handle upload, after version 3+ you don't need it anymore.在 WP 版本 3 之前,这是处理上传的方法,在版本 3+ 之后,您不再需要它了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.