yesorno
V2EX  ›  问与答

网站丢失样式 请问怎么解决

  •  
  •   yesorno · Feb 28, 2017 · 5690 views
    This topic created in 3372 days ago, the information mentioned may be changed or developed.

    学习建站 在阿里云上买了一个共享虚拟主机,域名申请了阿里的免费版证书,做了 CDN 。( www 和顶级域名都做了 cdn )上传了 wordpress 后,打开站点发现格式丢失,删除整个根目录后重新上传问题依旧,请帮忙分析一下,谢谢。 http://i.imgur.com/FTISwW8.png

    20 replies    2017-03-01 17:17:22 +08:00
    Hello1995
        1
    Hello1995  
       Feb 28, 2017 via Android   ❤️ 1
    按 F12 , Network 看各请求的状态…
    yesorno
        2
    yesorno  
    OP
       Feb 28, 2017
    @Hello1995
    Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure stylesheet 'http://abc.com/wp-includes/css/buttons.min.css?ver=4.7.2'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:9 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure stylesheet 'http://abc.com/wp-admin/css/install.min.css?ver=4.7.2'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure script 'http://abc.com/wp-includes/js/jquery/jquery.js?ver=1.12.4'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure script 'http://abc.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure script 'http://abc.com/wp-admin/js/language-chooser.min.js?ver=4.7.2'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure favicon 'http://abc.com/favicon.ico/wp-admin/setup-config.php'. This content should also be served over HTTPS.
    /favicon.ico/wp-admin/setup-config.php Failed to load resource: the server responded with a status of 500 ()
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure stylesheet 'http://abc.com/wp-includes/css/buttons.min.css?ver=4.7.2'. This request has been blocked; the content must be served over HTTPS.
    setup-config.php:1 Mixed Content: The page at 'https://abc.com/wp-admin/setup-config.php' was loaded over HTTPS, but requested an insecure stylesheet 'http://abc.com/wp-admin/css/install.min.css?ver=4.7.2'. This request has been blocked; the content must be served over HTTPS.
    yesorno
        3
    yesorno  
    OP
       Feb 28, 2017
    @Hello1995 能帮我看看是什么意思吗
    ss098
        4
    ss098  
       Feb 28, 2017 via Android   ❤️ 1
    你的这样些样式仍然是 http 请求,你要替换为 https 。
    yesorno
        5
    yesorno  
    OP
       Feb 28, 2017
    @ss098 这个应该是在 wordpress 里面调整还是在哪儿呢
    lecher
        6
    lecher  
       Feb 28, 2017   ❤️ 1
    https 主域下面,因为安全原因,不能加载非 https 的资源,所以 http 的请求全都被拦截了。
    解决办法就是把所有的静态资源都换成 https 的加密域
    yesorno
        7
    yesorno  
    OP
       Feb 28, 2017
    @lecher 这个难不难呢?
    lslqtz
        8
    lslqtz  
       Feb 28, 2017 via iPhone
    动不动 https …醉了
    yesorno
        9
    yesorno  
    OP
       Feb 28, 2017
    @lslqtz 因为看到网上说这是趋势 所以想一开始的时候就弄好 免得之后再做就更麻烦了
    RealLiuSha
        10
    RealLiuSha  
       Feb 28, 2017
    楼上已有正解, wordpress 需要到数据库里执行几条 sql
    PangCi
        11
    PangCi  
       Feb 28, 2017 via iPhone   ❤️ 2
    还是先把基础学好了,你这样直接搞不仅浪费时间还增加学习成本
    maijiawei
        12
    maijiawei  
       Feb 28, 2017   ❤️ 1
    别动不动就 https ,先把基础学好了
    qiayue
        13
    qiayue  
    PRO
       Feb 28, 2017   ❤️ 1
    如果你不懂的话,最笨的办法就是,每张表的每行记录看一下如果有 http:// 就替换成 https://
    耿崇明一点办法是通过 sql 批量替换
    irainsoft
        14
    irainsoft  
       Feb 28, 2017   ❤️ 1
    简单一点用.htaccess 文件 301 跳转到 https 吧 wp 后台也应该有站点网址设置的
    百度 关键词 wordpress https 对小白的教程大把大把,不如先看一个,这种基础的问题再单独出来问反而是低效的
    lslqtz
        15
    lslqtz  
       Feb 28, 2017 via iPhone
    @irainsoft 301 不行
    irainsoft
        16
    irainsoft  
       Feb 28, 2017
    @lslqtz 是我说错了还是方法不对....
    J0022ZjV7055oN64
        17
    J0022ZjV7055oN64  
       Feb 28, 2017   ❤️ 1
    插件 SSL Insecure Content Fixer
    lslqtz
        18
    lslqtz  
       Feb 28, 2017
    @irainsoft 方法不对
    浏览器遇到 http 的资源, js 在被检测到是 http 时就不会发送任何请求,因此不会得到 301 响应
    jiangzhuo
        19
    jiangzhuo  
       Feb 28, 2017 via iPhone
    把样式和 html 还有 js 写在一个 html 文件里不就好了……
    yesorno
        20
    yesorno  
    OP
       Mar 1, 2017
    @irainsoft 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 74ms · UTC 07:21 · PVG 15:21 · LAX 00:21 · JFK 03:21
    ♥ Do have faith in what you're doing.