在我的服务器上安装了http Nginx version: 1.2.7
今天我打开了 SSL。
但我有一个大问题,我不知道如何设置绝对所有子页面永久转移到:https://example.com
所以我想要这一切:
http://example.com
http://www.example.com
被重定向到 https://example.com
http://www.example.com/test.pdf
被重定向到https://example.com/test.pdf
喜欢所有子页面(我有 500 个子页面 200 html – 300 pdf)。
在我的 https 上安装了 Apache。
还有如何配置一切,因为我的知识很少。
最佳答案
试试这个:返回 301 https://example.com $request_uri;
关于http - Nginx (1.2.7) 将 HTTP 重定向到 HTTPS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25364755/