Last active
September 24, 2020 14:06
-
-
Save jprieton/b65b70fa8807bcb335e6 to your computer and use it in GitHub Desktop.
.htaccess para usar timthumb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN TimThumb .htaccess | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteCond %{REQUEST_URI} (?i)(jpg|jpeg|png|gif)$ | |
RewriteCond %{QUERY_STRING} h=([1-9]) [OR] | |
RewriteCond %{QUERY_STRING} w=([1-9]) | |
RewriteRule (.*) ./path/to/timthumb.php?src=%{REQUEST_URI}&%{QUERY_STRING} | |
</IfModule> | |
# END TimThumb .htaccess |
it does not work.
what am i missing?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} (?i)(jpg|jpeg|png|gif)$
RewriteCond %{QUERY_STRING} h=([1-9]) [OR]
RewriteCond %{QUERY_STRING} w=([1-9])
RewriteRule (.*) timthumb.php?src=%{REQUEST_URI}&%{QUERY_STRING}
htaccess and timthumb.php in same directory
and my image:
<img src="http://path/to/image.jpg?h=100&w=100">
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uso: