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

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

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?