duanhui7329 2013-12-17 19:57
浏览 40
已采纳

文件SRC路径在部署时自动更改

This issue has me stumped:

I moved my local files from my Xampp to a Bitnami LAMP stack on Ubuntu AWS. I uploaded all using Filezilla. Upon upload my javascript didn't work. I didn't understand why until I looked at the HTML coming from the server.

Instead of my regular paths...

<link href="css/tooltipster.css" rel="stylesheet" type="text/css"/>

<!-- Scripts-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="post.js"></script> etc...

I got this:

<link href="http://myawsip/css/A.SpryTabbedPanels.css+tooltipster.css,Mcc.KFxZEWandq.css.pagespeed.cf.3Swzy938h5.css" rel="stylesheet" type="text/css"/>

    <!-- Scripts-->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="http://myawsip/js/post.js,Mjm.gvzSGVXyEh.js+player.js,Mjm.knKxAablGA.js+SpryTabbedPanels.js,Mjm.kvF1NI0-pM.js+menu_right_dynamic.js,Mjm.9vUmreO6tb.js+jquery.tooltipster.js,Mjm.urV6AglKpQ.js.pagespeed.jc.HIUzWcgd7x.js"></script><script>eval(mod_pagespeed_pv1QAJpZL$);</script>
    <script>eval(mod_pagespeed_L2$U6aAm8V);</script>
    <script>eval(mod_pagespeed_5VPbKVMy_4);</script>
<script>eval(mod_pagespeed_Sxlhb$9amX);</script>

    <script>eval(mod_pagespeed_0_Dq_37I8a);</script>

Could this be because I have a AWS IP? I didn't put in any "eval" or anything else for that matter and I have no idea how all this got in there. I reuploaded, but nothing seems to fix this. The files on my computer have proper links to all the files, scripts or css, but once I upload they are changed.

Any idea what could be causing this problem? Any setting perhaps that I have to set in order to transfer files without this anomaly happening?

Thank you very much.

  • 写回答

1条回答 默认 最新

  • ds15812330851 2013-12-17 20:00
    关注

    That would be mod_pagespeed by Google

    Since you may / may not have access to the configs. This .htaccess change will work

    ModPagespeed off

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)