我正在为两个不同的网站使用一个数据库。一个是sitejury。另一个是cdn1。现场陪审团。com。我正在尝试使用子域服务我的文件。
之前,我在我的域中使用了简单的https重写。但现在随着我的需求越来越大,对我来说设置变得越来越复杂。
我需要重定向两个www.domain。com或域。com收件人https://domain.com
重定向cdn的所有版本。领域com到SSL https//:域。com版本除外(选项3)
我正在为两个不同的网站使用一个数据库。一个是sitejury。另一个是cdn1。现场陪审团。com。我正在尝试使用子域服务我的文件。
之前,我在我的域中使用了简单的https重写。但现在随着我的需求越来越大,对我来说设置变得越来越复杂。
我需要重定向两个www.domain。com或域。com收件人https://domain.com
重定向cdn的所有版本。领域com到SSL https//:域。com版本除外(选项3)
我目前正在使用此-
# TN - BEGIN https to https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^scorewheel\\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\\.scorewheel\\.com$
RewriteRule .* https://scorewheel.com%{REQUEST_URI} [R=301,L]
</IfModule>
# TN - END http to https
# TN - Begin cdn redirection
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cdn.scorewheel\\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\\.cdn.scorewheel\\.com$
RewriteCond %{REQUEST_URI} !^/wp-content/
RewriteCond %{REQUEST_URI} !^/wp-includes/
RewriteRule (.*) https://scorewheel.com%{REQUEST_URI} [R=301,L]
</IfModule>
# TN - End cdn redirection
# TN - Begin cdn https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?wp-content/(.*) https://cdn.scorewheel.com/wp-content/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?wp-includes/(.*) https://cdn.scorewheel.com/wp-includes/$1 [R=301,L]
</IfModule>
# TN - End cdn https
我不是很熟悉php,我对wp_sanitize_redirect. 我看到了这个非常好的问题和答案:wp_sanitize_redirect strips out @ signs (even from parameters) -- why?如何重写此方法Wordpress,以便传递| 作为URL的一部分,它不会被剥离?我正在使用最新的5。Wordpress的x版。