【问题标题】:wordpress multi site sub directory open force with www带有 www 的 wordpress 多站点子目录开放力
【发布时间】:2019-04-14 21:14:55
【问题描述】:

我遵循此代码

# BEGIN WordPress

重写引擎开启

重写基础/

重写规则 ^index.php$ - [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

重写规则 ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

重写规则 ^ - [L]

重写规则 ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]

重写规则 ^[_0-9a-zA-Z-]+/(.*.php)$1 [L]

重写规则。 index.php [L]

在这段代码中,如何设置所有使用https://www/domain.com打开的网站

【问题讨论】:

    标签: wordpress .htaccess multisite


    【解决方案1】:

    强制 www:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-27
      • 1970-01-01
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-16
      相关资源
      最近更新 更多