nginx - Is it possible to use server 301 redirection to create static file CDN?
phpcn_u1582
phpcn_u1582 2017-05-16 17:04:08
0
3
512

For example, the static file access address of a normal website is: abc.com/static/logo.png Can this file address be changed to baidu.com/static/logo.png through server 301 redirection? This avoids downloading static files directly from the abc.com server and instead downloads them from the baidu.com website

phpcn_u1582
phpcn_u1582

reply all(3)
大家讲道理

Of course you can, but with one more redirect, apart from saving some server traffic, I’m afraid it won’t improve the user experience.
Because the time consumption is mainly in establishing the connection with the new server, it does not take much time to transfer the data.

For your example, I suggest that the static files from baidu.com be directly quoted in the page.

仅有的幸福

Yes, image static resources support 301 these

漂亮男人

Yes, this can be used to improve the access experience of overseas websites
Such as hostker

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!