cpanel中的pagespeed与某些域失败

时间:2014-07-22 07:36:25

标签: cpanel cdn pagespeed

我的主机有一个cpanel,允许从谷歌打开页面速度。无论如何打开它会在某些域(我的情况下为cdnjs maxcdn)上为外部托管的js库产生403错误,但不会与googleapis产生错误。有什么理由吗?

1 个答案:

答案 0 :(得分:0)

要避免这种情况,请打开.htaccess文件,您将在文件中找到它:

# mod_pagespeed configuration - Do NOT modify the contents
<IfModule pagespeed_module>
    ModPagespeedDomain *
    ModPagespeed on
</IfModule>
# End of mod_pagespeed configuration- Do NOT modify the contents

将其替换为:

# mod_pagespeed configuration - Do NOT modify the contents
<IfModule pagespeed_module>
    ModPagespeedDomain http://yourdomain.com
    ModPagespeed on
</IfModule>
# End of mod_pagespeed configuration- Do NOT modify the contents