httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard <lists-apa...@listmail.innovate.net>
Subject Re: [users@httpd] redirect port from 80 to 443
Date Sat, 18 Feb 2017 18:38:18 GMT


> Date: Saturday, February 18, 2017 11:04:34 -0700
> From: James Moe <jimoe@sohnen-moe.com>
>
> On 02/18/2017 05:08 AM, Rodrigo Cunha wrote:
>> i want redirect all request from port 80 to 443.
>> what is better setting for fix this?
>> 
>   Better than what?
>   Fix? Is it broken?
> 
> RewriteCond %{HTTP_HOST} =www.example.com
> RewriteCond %{SERVER_PORT} =80
> RewriteRule ^(.*)$ https://www.example.com/$1 [R]

Perhaps, better than using a "rewrite"? See the documentation
reference, given in an earlier post:

  <https://httpd.apache.org/docs/2.4/rewrite/avoid.html#redirect>

that has this as a specific example of when/why to use a "redirect"
rather than a "rewrite".



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message