Discuz! 2.5 Mirror Acceleration Problem

  android, question

To make a long story short, my purpose is only one
I have mirrored at least 5M CSS JS and medal pictures automatically by changing the link and the total link of the file.
There is no problem with repeated tests.

The main reason is that I saw a station where he even changed his avatar to a mirror image, so I changed the UC file configuration tohttp://wwwwuiamaopao.u.qiniudn.com/UCWait .. I don’t remember the file name either
After the change, it is indeed a mirror image, but I can’t upload the avatar.

How did he change it? This is his websitehttp://bbs.886520.com/

My website, www.wuaimaopao.com, now averages about 68 after a delay of more than 300 mirror images in ping website

How do you solve this problem

First of all, one problem should be made clear:
The mirror image storage of seven cows cannot be handled.http://some-domain.com/some-php.php?para1=a&para2=bThis kind of dynamic request (different parameters result in different results).
1、
You should have modified’ UC’API’ This parameter causes uc to be called during uploadServer’s dynamic api failed to get correct results.

2、
So where can seven cows be used?
First, UC_API cannot be modified.
Take a look at the page. The address of the head portrait is like this
http://some-domain.com/uc_server/avatar.php?uid=1&size=middle
The url of the access result is a 301 redirect to
http://some-domain.com/uc_server/data/avatar/000/00/00/01_avatar_middle.jpg
At such an address.
All right, this wayhttp://some-domain.com/uc_server/data/avatar/000/00/00/01_avatar_middle.jpgThis is where seven cows come to mirror storage.

3、
How to deal with it?
At present, it seems that the discuz code needs to be modified to solve the problem.
Uc under your dz directoryserver/avatar.php 中有一行
header('Location: '.UC_API.'/'.$avatar_url);
这就是之前提到的跳转的最终地址了,把这里修改成你需要的url就可以了,一般来说,把UC
API changed to’http://your-qiniu-domain.com/uc_serverThis string is fine.
This is the end of the principle. Then, give the final result directly:
header('Location: '.'http://wwwwuiamaopao.u.qiniudn.com/uc_server'.'/'.$avatar_url);

I hope I can solve your problem.