因为有一天,我的大拇指不工作了
然而,它确实计算出这可能与modsecurity有关。
所以下面的内容,直到一天前还有效。
http://www.HOST.com/wp-content/themes/THEME/scripts/timthumb.php?src=http://www.HOST.com/wp-content/uploads/2013/05/image.jpg&w=70&h=50&zc=1&q=100
现在只能使用
http://www.HOST.com/wp-content/themes/THEME/scripts/timthumb.php?src=/wp-content/uploads/2013/05/image.jpg&w=70&h=50&zc=1&q=100
我试着把这个放到我的htaccess里,但是没有变化
# WPhtc: Begin Custom htaccess
RewriteCond %{REQUEST_URI} !^/(timthumb) [NC]
RewriteRule ^scripts/timthumb.php?src=/(.*)x(.*)/r/(.*) scripts/timthumb.php?src=http://www.HOST.com/$3&h=$2&w=$1&c=1
# WPhtc: End Custom htaccess发布于 2013-08-06 18:44:58
使用TimThumb为您的图像,可以导致一些..看起来乱七八糟的代码(以免面对它,无法实现)。观察..
<img alt="Camping" src="/timthumb.php?src=/images/feb/image_001.jpg&w=250&h=250&" />为什么不使用一些时髦的.htaccess重定向呢?
<img alt="Camping" src="/images/feb/250/image_001.jpg" />是不是看起来好多了?您精彩的露营图像现在被设置为250像素的宽度,高度保持在正确的比例。
TimThumb的htaccess重写它是非常容易和简单的实现这一点!更新您的.htaccess文件,如下所示。
# With your other RewriteCond rules
RewriteCond %{REQUEST_URI} !^/(images) [NC]
RewriteRule ^(.+)/$ /$1 [R,L]
# Width
RewriteRule ^images/([a-zA-Z0-9-]+)/([0-9]+)/([a-z0-9.]+)?$ /tt.php?src=/images/$1/$3&w=$2如果您没有任何类型的文件夹系统,并且您所有的图像都被扔到了图像文件夹中,那么您可以使用以下方法
RewriteRule ^images/([0-9]+)/([a-z0-9.]+)?$ /tt.php?src=/images/$2&w=$1Source
https://stackoverflow.com/questions/16720646
复制相似问题