Friday, 15 February 2013

apache - How can I use mod_rewrite to redirect to a https connection? -


I always try to redirect people to

  https: //www.somedomain I am doing Com / URL   

This is because they come to a non-secure port because my SSL is for this URL.

Whenever someone goes to, he is sent to

   

Trying to rewrite htaccess:

  RewriteCond% {HTTPS} at RewriteRule (. *) Https: //www.% {HTTP_HOST}% {REQUEST_URI}  RewriteEngine >  

Edit:

I am using a cPanel server, so that additional hosts are not working.

You do not want to add www without unconditional, if it already exists. See:

No comments:

Post a Comment