WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do you know if there's a way to alter via htaccess the timthumb urls ? My question is if i can change for example urls like this




share|improve this question

Cadeyrn's code work probably for 1 specific size ( 200&w=350& etc) , the major problem with timthumb and the reason people use it, is that it allows for many dynamic sizes thus making .htaccess rewrite rules much more difficult, especially if you using friendly WordPress permalink structure.

There is a guide here on how to do it, it might need tweaking and honestly timthumb should be avoided. http://revisedagain.com/?p=18

share|improve this answer
Good link, and you're actually right about the problems. – petermolnar Apr 3 '11 at 20:55

You need to edit the .htaccess file, and add some rewrite rules. This only works with apache2, for other web servers, you need other solution.

Before the main part of the wordpress rewrite rules, but after RewriteEngine On:

# check if the file exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/images/
RewriteRule ^(.*)$ thumb.php?src=http://%{HTTP_HOST}/$1&h=200&w=350&zc=1&q=80 [L]

Please note, I cannot test this right now, and I'm really not sure, it'll work, but you need something like this.

share|improve this answer

you may try this solution:


from URL above:

This rule tells the server that


should be interpreted as

share|improve this answer
An answer should be more than just a link to an external site. Please add a solution. – toscho Nov 18 '12 at 22:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.