我目前正在使用此-
# 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