Forum Moderators: phranque
httPS://widgets.com it will direct to httP://www.widgets.com... is there a way to check for http or https and redirect to the appropriate? RewriteCond %{HTTP_HOST} !^(www\.widgets\.com)?$
RewriteRule (.*) http://www.widgets.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt
RewriteCond %{HTTP_HOST} !^(www\.widgets\.com)?$
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) http://www.widgets.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.widgets\.com)?$
RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) https://www.widgets.com/$1 [R=301,L]