产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] 301问题

412026849
铁牌会员
7.95 价值分

412026849 发表于 2017-02-07 18:34:49
请问如何实现:http://wzgwyw.com→https://www.wzgwyw.com
http://www.wzgwyw.com→https://www.wzgwyw.com
https://wzgwyw.com→https://www.wzgwyw.com
apach
amh5.3
2017-02-07 18:34:49 1

shiguo
铝牌会员
410.08 价值分

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [NC,R=301]
RewriteCond %{HTTP_HOST} ^xxxx.com [NC]
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [R=301,L]

Nginx
server_name xxx.com www.xxx.com;
rewrite ^(.*) https://www.xxx.com$1 permanent
仅作参考
  支持 (15.74分)  反对 (0分)
回复  2017-02-08 11:05:49 2

shiguo
铝牌会员
410.08 价值分

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [NC,R=301]
RewriteCond %{HTTP_HOST} ^xxxx.com [NC]
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [R=301,L]

上面的回复为什么自动去掉了 [NC,R=301]和 [R=301,L]
论坛过滤这些关键词了吗?
  支持 (0分)  反对 (0分)
回复  2017-02-08 11:08:16 3

amysql
创始人
99530.81 价值分

引用:
shiguo 发表于 2017-02-08 11:05:49
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [NC,R=301]...


应该都用[R=301,L]

搜索可以找到答案。
https跳转用规则
https://amh.sh/search.htm?keyword=%E5%BC%BA%E5%88%B6https&e=1

www域名跳转用规则
https://amh.sh/search.htm?keyword=301&e=1
  支持 (3.2分)  反对 (0分)
回复  2017-02-08 11:34:00 4

AMH面板 - 好用高效低占用、安全可靠极稳定

amysql
创始人
99530.81 价值分

引用:
shiguo 发表于 2017-02-08 11:08:16
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xxxx.com/$1 [NC,R=301]...

现在已经开了。
  支持 (0分)  反对 (0分)
回复  2017-02-08 11:36:43 5

412026849
铁牌会员
7.95 价值分

为啥我把它复制到AMRewrite里面还是不行
  支持 (0分)  反对 (0分)
回复  2017-02-08 11:47:21 6

amysql
创始人
99530.81 价值分

引用:
412026849 发表于 2017-02-08 11:47:21
为啥我把它复制到AMRewrite里面还是不行

工单有答复,你用的规则是错的。
认真核对的你规则。
  支持 (0分)  反对 (0分)
回复  2017-02-08 11:49:11 7

412026849
铁牌会员
7.95 价值分

你不是帮我改过来了吗
  支持 (0分)  反对 (0分)
回复  2017-02-08 12:03:18 8

412026849
铁牌会员
7.95 价值分

输入这个https://wzgwyw.com,还是没有跳到https://www.wzgwyw.com
  支持 (0分)  反对 (0分)
回复  2017-02-08 12:21:40 9

shiguo
铝牌会员
410.08 价值分

引用:
412026849 发表于 2017-02-08 12:21:40
输入这个https://wzgwyw.com,还是没有跳到https://www.wzgwyw.com

我这边ie11和火狐浏览器打开是跳转的,你清空浏览器缓存试试。
  支持 (0分)  反对 (0分)
回复  2017-02-08 13:57:35 10
 1 2 >  (总2页)
AMH社区列表
用户服务中心