|
1
301 重定向?或者重写页面?
|
|
2
|
|
3
服务端 301 重定向
|
|
4
直接设置 301 或者 302 就行了
|
|
5
301 重定向……
|
|
6
Header 里面加个 Strict-Transport-Security
|
|
jarlyynDec 9, 2016
8
server {
server_name www.herbcreation.com; listen 80; rewrite ^/(.*)$ https://www.herbcreation.com/$1 permanent; } 我的 nginx 配置 |
|
10
善用 www.example.com ,慎用 www.xxx.com
|
|
13
if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
|
|
14
Nginx
server { listen 80; server_name www.example.com; return 301 https://www.example.com$request_uri; } |
|
15
终于搞定,域名我就不发出了,小站。。。
环境 lamp 未解决:我在项目文件能创建.htaccess 配置好规则,然而并未生效,现在还没找出是什么原因. 解决:我是通过修改 vhosts 的配置文件实现 301 重定向.  |
|
16
更新一下图片
|
|
mephistoDec 9, 2016
17
return 301 https://$server_name$request_uri;
|
|
mephistoDec 9, 2016
18
add_header Strict-Transport-Security "max-age=31536000";
|
|
lhbcDec 9, 2016
19
你们啊,动不动就让楼主加 HSTS ,这是想坑死楼主吗?
哈哈哈 |
|
galenzhaoDec 9, 2016
20
hsts 有啥不好么?
|