redirect http to https through httpd.conf

后端 未结 2 390
夕颜
夕颜 2021-01-25 09:02

Need to change http to https.

http://myServerName/itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json **Should change to**          


        
2条回答
  •  野的像风
    2021-01-25 09:23

    I found the solution: To change particular or any http call to https call, put the code in

    VirtualHost :80
       ErrorLog /var/log/httpd/error_log
       CustomLog logs/access.log common
       LogLevel info
       RewriteCond %{HTTPS} off
       RewriteEngine On
       RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
       RewriteEngine On
    

提交回复
热议问题