Forum Moderators: phranque
########## Begin - Rewrite rules to enhance SEO SEF
#
# Externally redirect to canonical hostname, preserving the original
# request's http/https protocol, but excluding xmlrpc requests.
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{HTTP_HOST} ^(mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]
#
########## End - Rewrite rules to enhance SEO SEF ########## Begin - Rewrite rules to enhance SEO SEF
#
# Externally redirect to canonical hostname, preserving the original
# request's http/https protocol, but excluding xmlrpc requests.
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{HTTP_HOST} ^(mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{HTTP_HOST} ^(server001b\.mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]
#
########## End - Rewrite rules to enhance SEO SEF
# Externally redirect all non-blank non-canonical requests to canonical hostname, preserving
# the original request's http/https protocol, but excluding xmlrpc and admin requests on port 8443.
RewriteCond %{HTTP_HOST} !^(www\.mywebdomain\.com)?$
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{SERVER_PORT} !=8443
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]