【发布时间】:2017-12-24 22:02:16
【问题描述】:
需要把http改成https。
http://myServerName/itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json **Should change to** https://myServerName//itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json
为此,我在 httpd.conf 文件中包含以下内容
*LoadModule rewrite_module modules/mod_rewrite.so
RewriteCond %{HTTPS} off
RewriteEngine On
RewriteRule ^(.*)(\/itf)(\/sheldon\/)(.*)\.(json|JSON)$ https://myServerName/$2$3$4.json [L,R=301,NC]
RewriteRule "^(.*)(\/itf)(\/fqs\/)(.*)\.(json|JSON)(.*)$" https://myServerName/itf/fqs/$4.json$6 [R=301,L,NC]
Include conf/vhost.conf*
The vhost.conf file have necessary configuration for virtualhost:443
So I am able to get the result if I use https://myServerName/....,
**but not able to get the result with** http://myServerName/...
【问题讨论】:
标签: apache mod-rewrite httpd.conf