Hunter的大杂烩

一月 18, 2011

discuz 头像映射

类归于: 技术话题 — hunter @ 10:47 下午

 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]

WordPress 所驱动