V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yesorno
V2EX  ›  问与答

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

  •  
  •   yesorno · 2017-02-28 12:30:20 +08:00 · 4978 次点击
    这是一个创建于 2824 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    20 条回复    2017-03-01 17:17:22 +08:00
    Hello1995
        1
    Hello1995  
       2017-02-28 12:39:14 +08:00 via Android   ❤️ 1
    按 F12 , Network 看各请求的状态…
    yesorno
        2
    yesorno  
    OP
       2017-02-28 12:44:25 +08:00
    @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
       2017-02-28 12:44:44 +08:00
    @Hello1995 能帮我看看是什么意思吗
    ss098
        4
    ss098  
       2017-02-28 12:59:12 +08:00 via Android   ❤️ 1
    你的这样些样式仍然是 http 请求,你要替换为 https 。
    yesorno
        5
    yesorno  
    OP
       2017-02-28 13:00:13 +08:00
    @ss098 这个应该是在 wordpress 里面调整还是在哪儿呢
    lecher
        6
    lecher  
       2017-02-28 13:00:20 +08:00   ❤️ 1
    https 主域下面,因为安全原因,不能加载非 https 的资源,所以 http 的请求全都被拦截了。
    解决办法就是把所有的静态资源都换成 https 的加密域
    yesorno
        7
    yesorno  
    OP
       2017-02-28 13:04:01 +08:00
    @lecher 这个难不难呢?
    lslqtz
        8
    lslqtz  
       2017-02-28 13:11:45 +08:00 via iPhone
    动不动 https …醉了
    yesorno
        9
    yesorno  
    OP
       2017-02-28 13:18:30 +08:00
    @lslqtz 因为看到网上说这是趋势 所以想一开始的时候就弄好 免得之后再做就更麻烦了
    lgpqdwjh
        10
    lgpqdwjh  
       2017-02-28 14:21:40 +08:00
    楼上已有正解, wordpress 需要到数据库里执行几条 sql
    PangCi
        11
    PangCi  
       2017-02-28 14:46:17 +08:00 via iPhone   ❤️ 2
    还是先把基础学好了,你这样直接搞不仅浪费时间还增加学习成本
    maijiawei
        12
    maijiawei  
       2017-02-28 14:49:54 +08:00   ❤️ 1
    别动不动就 https ,先把基础学好了
    qiayue
        13
    qiayue  
       2017-02-28 14:59:07 +08:00   ❤️ 1
    如果你不懂的话,最笨的办法就是,每张表的每行记录看一下如果有 http:// 就替换成 https://
    耿崇明一点办法是通过 sql 批量替换
    irainsoft
        14
    irainsoft  
       2017-02-28 15:40:53 +08:00   ❤️ 1
    简单一点用.htaccess 文件 301 跳转到 https 吧 wp 后台也应该有站点网址设置的
    百度 关键词 wordpress https 对小白的教程大把大把,不如先看一个,这种基础的问题再单独出来问反而是低效的
    lslqtz
        15
    lslqtz  
       2017-02-28 16:20:29 +08:00 via iPhone
    @irainsoft 301 不行
    irainsoft
        16
    irainsoft  
       2017-02-28 16:24:23 +08:00
    @lslqtz 是我说错了还是方法不对....
    J0022ZjV7055oN64
        17
    J0022ZjV7055oN64  
       2017-02-28 17:24:08 +08:00   ❤️ 1
    插件 SSL Insecure Content Fixer
    lslqtz
        18
    lslqtz  
       2017-02-28 18:11:01 +08:00
    @irainsoft 方法不对
    浏览器遇到 http 的资源, js 在被检测到是 http 时就不会发送任何请求,因此不会得到 301 响应
    jiangzhuo
        19
    jiangzhuo  
       2017-02-28 23:24:14 +08:00 via iPhone
    把样式和 html 还有 js 写在一个 html 文件里不就好了……
    yesorno
        20
    yesorno  
    OP
       2017-03-01 17:17:22 +08:00
    @irainsoft 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5253 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 08:56 · PVG 16:56 · LAX 00:56 · JFK 03:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.