.htaccess & timthumb i need help
-
Ok this is what I’m trying to do : use timthumb.php with external images and remove the query string “?” after goggling a little i’ve found a way using .htaccess, here is my code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^cdn-thumb/(.*)$ thumb/timthumb.php?$1 [L] </IfModule>
basically this code replaces the part thumb/timthumb.php?src= with cdn-thumb/src= and it works fine if the image is hosted on my website and I point to it using the relative path ex : wp-content/uploads/123.jpg but when i try using it with a image hosted elsewhere (other domain) it breaks giving 404 error because it removes a slash from https://
ex:
https://my-domain.com/cdn-thumb/src=https://domain.com/123.jpg
i get only
https://my-domain.com/cdn-thumb/src=http:/domain.com/123.jpg
so any clue how to fix this ? or alternative solutions ?
- The topic ‘.htaccess & timthumb i need help’ is closed to new replies.