ok flop, let's do that
plg wrote:
1) the hotlink on the "web size" becomes a hotlink on the original
2) the hotlink on the HD no longer works
3) the hotlink on the thumbnail no longer works
as finally the file is generated by PHP here is a proposal which solves all three points (this is a part of the PHP script)
## redirect <2.4 thumbnails hotlinks to i.php
RewriteRule ^upload/(.*)/'.preg_quote($conf['dir_thumbnail']).'/'.preg_quote($conf['prefix_thumbnail']).'(.*)\.([a-z0-9]{3,4})$ i.php?/upload/$1/$2-th.$3 [L]
RewriteRule ^galleries/(.*)/'.preg_quote($conf['dir_thumbnail']).'/'.preg_quote($conf['prefix_thumbnail']).'(.*)\.([a-z0-9]{3,4})$ i.php?/galleries/$1/$2-th.$3 [L]
## redirect <2.4 high-def hotlinks to original file
RewriteRule ^upload/(.*)/pwg_high/(.*)\.([a-z0-9]{3,4})$ upload/$1/$2.$3 [L]
RewriteRule ^galleries/(.*)/pwg_high/(.*)\.([a-z0-9]{3,4})$ galleries/$1/$2.$3 [L]
## redirect <2.4 low-def hotlinks to i.php
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?'.preg_quote($_SERVER['SERVER_NAME']).'/.*$ [NC]
RewriteRule ^upload/(.*)/(.*)\.([a-z0-9]{3,4})$ i.php?/upload/$1/$2-me.$3 [L]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?'.preg_quote($_SERVER['SERVER_NAME']).'/.*$ [NC]
RewriteRule ^galleries(.*)/(.*)\.([a-z0-9]{3,4})$ i.php?/galleries/$1/$2-me.$3 [L]I know, hard to read :)
Offline
As described in [Forum, post 127016 by rvelices in topic 18648] [2.4] multiple size / original - protection of urls, you should add:
<IfModule mod_rewrite.c> ... </IfModule>
Offline
Did you make sure that you didn't overwrite any existing .htaccess?
Offline
plg wrote:
As described in [Forum, post 127016 by rvelices in topic 18648] [2.4] multiple size / original - protection of urls, you should add:
Code:
<IfModule mod_rewrite.c> ... </IfModule>
done
plg wrote:
Did you make sure that you didn't overwrite any existing .htaccess?
yes
Offline