Hi, I was wondering how to make a redirect like this: I have http://sub.domain.com but I want to redirect(301) this to https://sub.domain.com. My controlpanel is DirectAdmin,but can't redirect it within the cp like the way I want the redirect. Can someone help me how to make a rewrite for htaccess ? Thanks in advance. Kind regards, Richard
Please try with the following redirect code in your .htaccess RewriteCond %{HTTP_HOST} ^sub.domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.sub.domain.com$ RewriteRule ^/?$ "https\:\/\/www\.sub.domain\.com\" [R=301,L]
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] Code (markup): FYI... you could have used google.