Hi, how can I rewrite a dynamic image url? This: http://www.hdmusicvideos.info/yapi.php?path=http://www.hdmusicvideos.info/thumbs/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg Code (markup): To this: http://www.hdmusicvideos.info/resized/thumbs/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg Code (markup): or to this: http://www.hdmusicvideos.info/resized/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg Code (markup):
Try this Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)\yapi.php$ $1 RewriteCond %{QUERY_STRING} ^path=http://www.hdmusicvideos.info/(.*)$ [NC] RewriteRule ^(.*)$ $1/%1? [R=301,L,NE] Code (markup):
I tried, it redirects from: http://www.hdmusicvideos.info/yapi..../thumbs/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg to: http://www.hdmusicvideos.info/thumbs/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg
Whoops didn't see that, here ya go - Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)\yapi.php$ $1 RewriteCond %{QUERY_STRING} ^path=http://www.hdmusicvideos.info/thumbs/(.*)$ [NC] RewriteRule ^(.*)$ resized$1/%1? [R=301,L,NE] Code (markup): will output - http://www.hdmusicvideos.info/resized/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg while Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)\yapi.php$ $1 RewriteCond %{QUERY_STRING} ^path=http://www.hdmusicvideos.info/(.*)$ [NC] RewriteRule ^(.*)$ resized$1/%1? [R=301,L,NE] Code (markup): will output - http://www.hdmusicvideos.info/resized/thumbs/mc-yankoo-ne-zovi-me-ft-dj-mladja.jpg