Hunter的大杂烩 技术学习笔记

2011-01-18

discuz 头像映射

Filed under: 技术话题 — hunter @ 10:47 pm

 discuz的头像是通过一个php中转重定向的,如果并发量上来后效率较低,可以替换为如下的rewrite规则

        RewriteCond /usr/local/bbs/%{REQUEST_FILENAME} !-f
        RewriteRule /ucenter/data/avatar/(.+)_small.jpg$ /usr/local/bbs/ucenter/images/noavatar_small.gif [L]
        RewriteCond /usr/local/bbs/%{REQUEST_FILENAME} !-f
        RewriteRule /ucenter/data/avatar/(.+)_middle.jpg$ /usr/local/bbs/ucenter/images/noavatar_middle.gif [L]
        RewriteCond /usr/local/bbs/%{REQUEST_FILENAME} !-f
        RewriteRule /ucenter/data/avatar/(.+)_big.jpg$ /usr/local/bbs/ucenter/images/noavatar_big.gif [L]

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress