北美网备份站

标题: 站点启动https各类测试问题和应对 [打印本页]

作者: admin    时间: 2017-4-6 17:44
标题: 站点启动https各类测试问题和应对
1:Youtube视频 在帖子里不显示( 编辑栏里的)以及一键链接
  Y; H% @) H. G- O# O+ K1 W) ]& v+ }( f6 a, A0 }% u

1 H5 ?7 V, K! j. m( J
! F5 `( V! a) U5 `
7 ~6 c$ [  M! g( B
) N# `3 z, a/ u: o+ ^" K
+ x: v; y* v! p2 u# _' I) e$ c9 ?! h- Y- M4 n$ I) C1 f
   
; r) M: l! c5 v8 ^& B
作者: admin    时间: 2017-4-6 17:45
修改Youtube封面插件:youtube.class.php+ C" @. w4 z: U( M% f; o9 v
查找 src:
% R' v" M6 e  O
  1. + i7 o. o$ i' J5 i  e2 S
  2. $return = '<iframe width="'.($width>0?$width:'740').'" height="'.($height>0?$height:'500').'" src="https://www.youtube.com/embed/'.$vid.'?wmode=opaque" frameborder="0" allowfullscreen></iframe>';
复制代码
3 @5 X- m/ A) v+ x

% S3 ^+ o! n. o
8 P( z4 p# z3 T9 S+ g( z将上面http 改为https,
* E. n: C5 D$ i1 g, }3 `0 B0 h' _$ j1 u1 L2 S5 K, J
done.
! i) P& C. U8 o& Q; R2 @: a4 B# K
7 i8 a; d5 x; F! s7 C3 m0 @3 K
作者: 北美生活网    时间: 2017-4-7 02:10
使用https://www.jitbit.com/sslcheck/#, 检查整站非安全http链接。
& z+ x' A' [  c0 X+ t3 T
7 \9 J; Z8 c+ ^( d5 f发现L~第二个问题:北美商评:+ g1 ~% ]1 d2 r$ H7 _/ n" p

1 }5 S1 }6 V) W* @# V6 W头部css需要banner需要修正:
' _. Z. w7 Z  p' _, b) X6 y! ]# Q
改变http 链接:
( R' z# s* e% C1 Z7 R2 U, g, X3 _# V6 u8 g: V8 J) d
https://www.beimeilife.com/source/plugin/space/static/js/common.js?dA1: U. [5 J7 |% P6 z/ h2 A! c/ ]1 K
http://wpa.qq.com/pa?p=2:1810710581:46
6 C# n" s! s8 f5 A" l# K! lhttps://www.beimeilife.com/source/plugin/space/template/default/css/style.css?dA16 P2 k0 A1 x3 ^3 R2 U
都在管理平台直接修改, 已经完成
- n* t* b/ X7 j/ Z! _9 c$ G2 @. Q. y
作者: admin    时间: 2017-4-7 02:56
看到这个:百度开放收录https站点公告-----http://zhanzhang.baidu.com/wiki/494
& f6 n; U4 X& }. @这是2015的,不知道现在如何,
$ O! H: U- X% O( s( ]! P. r# B4 O" k7 q
重新打开了百度结构化数据,如果依旧自动收录,则保留。6 q! e( G2 I1 V8 Z) I% b9 G% J4 A

作者: admin    时间: 2017-4-7 03:12
发现问题三: 百度站内搜索,使用http链接,导致主页和论坛首页不安全, 需要搜索代码,周末再改7 q8 }( O' K* R1 Q1 m+ V. P1 |
forum.php---view source--检查6 ~3 y: w: e2 _( x, o8 `! A, D5 Z: m
4 l- P9 T& _8 ~& K0 X; B
  1. <script type="text/javascript">(function(){var bdcs = document.createElement('script');bdcs.type = 'text/javascript';bdcs.async = true;bdcs.src = "http://znsv.baidu.com/customer_search/api/js?sid=xxxxxxxx" + '&plate_url=' + encodeURIComponent(window.location.href) + '&t=' + Math.ceil(new Date()/3600000) + '&callback=znForDz';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(bdcs, s);})();</script>2 b: r$ T5 z: ^! q6 u9 _" V& s
  2. <script src="source/plugin/baidusubmit/template/jquery-1.8.3.min.js"></script>4 D: \# y6 F3 l6 ^" p
  3. <script type="text/javascript">
    8 F( ^0 j1 \* u! T. T
  4. var bdjq = jQuery.noConflict(true);
    : X" @$ Y/ ?4 j# _  M7 k" h3 {
  5. function znForDz(siteConfig){' g' t; w: T! r
  6.     bdjq(function(){/ W3 I# \' ^- L; B7 _  g
  7.         var zn = 'http://zhannei.baidu.com/cse/search?s=xxxxxxxxxxxx';& |0 G% z1 Z) g8 S6 P' N) t1 v- k
  8.         if (siteConfig && siteConfig.resultUrl){' l, u* ^+ d9 p$ K2 F* h+ P* L
  9.             zn = 'http://' + siteConfig.resultUrl + '/cse/search?s=xxxxxxxxxx'2 E* ?. `7 r- W1 F
复制代码
. s0 \# W9 q. O8 W7 ^. I

. z) v$ ]1 F( P  o5 z9 C
作者: admin    时间: 2017-4-7 03:30
注:暂时保留百度,等有机会时间再弄( 因为发现博客页也有百度搜索,但是显示安全, 晕~继续排查0 V; D9 P6 ~  A5 T/ [' h8 ]
1 G$ Y* X4 |) Q! p% r# o3 a
& k8 s0 D' |- ^* a- B

& n: h5 u, Q/ \& d
5 k' P/ N" q& \- x% A5 C$ y# F删除百度站内搜索: 还原操作:( 如下是添加百度搜索,按照步骤还原操作, 同时可以添加Google---站内以及全网搜索, 更好更强大) _* V6 ?7 H7 S2 j
' K9 T9 z% C" W3 f2 q1 w$ F
http://jingyan.baidu.com/article/7908e85c8f0c36af481ad22d.html
/ c1 ^! I% s3 y/ S2 X( f& }) d: w+ Y8 s
修改discuz搜索模板
操作步骤:备份模板common目录下的pubsearchform.htm(模板是你目前使用的模板)然后打开此文件做如下修改:
然后打开此文件做如下修改: 13行
<form id="scbar_form" method="{if $_G[fid] && !empty($searchparams[url])}get{else}post{/if}" autocomplete="off" action="{if $_G[fid] && !empty($searchparams[url])}$searchparams[url]{else}search.php?searchsubmit=yes{/if}" target="_blank">
修改为

# Z/ T8 z3 U9 }* n6 i
<form id="scbar_form" method="get" autocomplete="off" action="http://zhannei.baidu.com/cse/search" target="_blank">
下面新增两行
<input type="hidden" name="s" value="你的id">
<input type="hidden" name="ie" value="{CHARSET}">
删除第26行这行代码
<input type="hidden" name="q" id="cloudsearchquery" value="" />
第44行
<td class="scbar_txt_td"><input type="text" name="srchtxt" id="scbar_txt" value="{lang enter_content}" autocomplete="off" x-webkit-speech speech /></td>
修改为:
<td class="scbar_txt_td"><input type="text" name="q" id="scbar_txt" value="{lang enter_content}" autocomplete="off" x-webkit-speech speech /></td>
然后应该就ok啦! 以上只是实现了此功能,可以说是能用了,但是会提交很多多余的参数,而且帖子用户什么的下拉选项无效了。 如果你想完美点,请继续以下操作: 从第14行删到40行(之前删过一个26行了)
<input type="hidden" name="mod" id="scbar_mod" value="search" />
                <input type="hidden" name="formhash" value="{FORMHASH}" />
                <input type="hidden" name="srchtype" value="title" />
                <input type="hidden" name="srhfid" value="$_G[fid]" />
                <input type="hidden" name="srhlocality" value="$_G['basescript']::{CURMODULE}" />
                <!--{if !empty($searchparams[params])}-->
                        <!--{loop $searchparams[params] $key $value}-->
                        <!--{eval $srchotquery .= '&' . $key . '=' . rawurlencode($value);}-->
                        <input type="hidden" name="$key" value="$value" />
                        <!--{/loop}-->
                        <input type="hidden" name="source" value="discuz" />
                        <input type="hidden" name="fId" id="srchFId" value="$_G[fid]" />
                        <input type="hidden" name="q" id="cloudsearchquery" value="" />
1 ]# t0 s7 [) x: H% m
                        <style>
                        #scbar { overflow: visible; position: relative; }
                        #sg{ background: #FFF; width:456px; border: 1px solid #B2C7DA; }
                        .scbar_narrow #sg { width: 316px; }
                        #sg li { padding:0 8px; line-height:30px; font-size:14px; }
                        #sg li span { color:#999; }
                        .sml { background:#FFF; cursor:default; }
                        .smo { background:#E5EDF2; cursor:default; }
            </style>
            <div style="display: none; position: absolute; top:37px; left:44px;" id="sg">
                <div id="st_box" cellpadding="2" cellspacing="0"></div>
            </div>
                <!--{/if}-->
然后删除第45行
<td class="scbar_type_td"><a href="javascript:;" id="scbar_type" class="xg1" hidefocus="true">{lang search}</a></td>
现在大功告成
* U& i& O( y% Z0 X9 T

作者: admin    时间: 2017-4-7 04:35
解决了论坛首页的安全设置问题, 频道因为许多封面是外链图片, 以及网站首页广告客户链接都是非安全的http, 将逐步移动到其他单独网页上。
作者: admin    时间: 2017-4-7 05:23
8 P5 I1 t( @- Q! K0 P, |7 ]3 H
解决商品点评的安全展示问题, (修改qq地址为静态)1 N# O% v$ j: }, M* }
, m+ \% d" X  D/ ]6 b6 q
继续学习:
$ ]( z$ B2 l7 j% t$ R, F+ s% W+ F' E+ e
http://www.discuz.net/thread-3793230-1-1.html
作者: 北美生活网    时间: 2017-4-7 11:21
发现问题, 商家点评以及免费黄页, 地图http://ditu.google.cn/maps/api/js?sensor=false&language=zh_cn
% r- z- \* n8 {8 N  Z7 s2 E" `* x9 [$ r
需要改成:https://ditu.google.cn/maps/api/js?sensor=false&language=zh_cn, w. r& h( c/ n; s
  i6 V% M. B4 I& v9 P' ?7 K8 Z3 \: @1 k
https://www.google.com/maps/api/js?sensor=false&language=zh_cn
作者: 北美生活网    时间: 2017-4-7 11:56
  1. space-template-default-nav.htm
复制代码

$ \* a/ i( E/ s5 l1 t1 q
6 T& s4 |# ^( ?
作者: 北美生活网    时间: 2017-4-7 12:01
  1. map.htm6 n+ {$ s* C( D$ H2 M

  2. " `% T, [+ `! ~

  3. 8 T+ Z, Y0 }1 s: t, ~
  4. <img src="http://ditu.google.cn/mapfiles/marker{eval echo chr(ord($shop_list_i)+16);}.png" />
    $ e  N- q# f. T& m

  5. & n) o8 M( M2 ?9 j$ @
  6. 9 z5 g; R: D4 H4 M7 S) @" w
  7. <img src="http://ditu.google.cn/mapfiles/marker{eval echo chr(ord($shop_list_i)+16);}.png" />
    2 [2 V- `4 R. @/ s3 U. a

  8. + R4 h5 B; R; t0 j0 b- K! B

  9. 4 R* Y, n% ~* j  c0 d* e/ T: b
  10. https://www.google.com/maps/@49.0463735,-122.277187,12z?hl=zh$ `2 |9 d$ G0 K: o

  11. : @* V. ^% M& G$ Y0 ~3 E6 ]2 @, B

  12. ! z: e0 o: K$ P: x
  13. https://www.google.com/maps/@{eval echo chr(ord($shop_list_i)+16);}.png- L& `3 I, j, h, ~3 K' M: x
  14. ; k  h# ]0 \6 {4 W

  15. % a0 F1 t0 }; Y! G9 b
  16. https://www.google.com/mapfiles/marker
    8 u! a" P3 N6 h

  17. / K: R) l5 ?- D- ^3 R
  18. https://www.google.com/mapfiles/marker{eval echo chr(ord($shop_list_i)+16);}.png
    ) j7 ~- b" `; E$ K

  19. 4 j- U1 Z* f- H
  20. ! A1 f5 K! w8 _
  21. https://sites.google.com/site/gmapicons/home/
    " p( f2 c4 o# o8 o1 F/ o, \# E

  22. - I' d4 z+ S; u! e, l  C
  23. <script src="hditu.google.cn/maps/api/js?sensor=false&language={$_G['config']['output']['language']}" type="text/javascript"></script>
    ! x# a6 m4 h" h) t" \- ~  t
  24. https://www.google.com/maps/api/js?sensor=false&language=zh
复制代码
! x# `" |) K9 W. U7 u3 ~
4 j; J4 |: |! v; @  c

作者: admin    时间: 2017-4-8 06:53
删除:htaccess1 @, M. r3 s6 N& v
0 [1 m' b5 g% Z. m9 G! f$ [8 v, [
RewriteCond %{HTTPS} off* n8 E4 q* a% z5 ~% o
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]" R7 p- j0 A* Q% O3 U% K. g' j
* C: E# p: v" ]2 V& a" f
通信成功
作者: 北美生活网    时间: 2017-4-9 07:47
修改function_url2html.php( L) q- l5 h4 M/ m  h( E6 c- I( x+ k
" A3 W2 n& A3 R$ x# m9 R( Y
qq---http---https 使得论坛支持一键贴
作者: admin    时间: 2017-4-9 08:22
百度的分享JS无法通过HTTPS打开
% R6 E) g) H7 M
! ^7 L7 s- x9 x1:从模板设置里停止:09 B* f7 S( B6 ^: {& [* G
) l" t4 S$ e. O$ U
2:模板编码:viewthread_node.php 中:删除:
  t/ e( |" B: h6 c! p$ ?2 d0 Y& a* x8 C$ B0 X
                                <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" style="float: right;margin-top:-5px;">
4 o$ A- z, \% d/ s                                        <span class="bds_more">分享到:</span>
7 }" W! y1 _1 T5 _9 v8 l3 H                                        <a class="bds_qzone"></a>
! J) I6 z4 T- q& w                                        <a class="bds_tsina"></a>
( E( D& U( {$ B* H8 E1 R( A8 X3 O  }                                        <a class="bds_tqq"></a>1 G( S' r' Y  D* g
                                        <a class="bds_renren"></a>
3 n6 f& m9 H) a4 f! s9 ~" \) ]                                </div>
# L1 u. s& E1 K9 ~                                <script type="text/javascript" id="bdshare_js" data="type=tools" ></script># S1 N, h, }. }# J: I9 u' n
                                <script type="text/javascript" id="bdshell_js"></script>
* J0 p% b( C* A4 H                                <script type="text/javascript">! X! X* g" A& D9 M9 D( A
                                        document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();$ n8 z9 F$ q+ n/ M2 q4 |! j
                                </script>                        ! e# [- a5 ^# M8 O# }; }( L





欢迎光临 北美网备份站 (http://beimeilife.duckdns.org/) Powered by Discuz! X3.2