on the old version, when uploading an image named 1.jpg the URL was:
/?v=1.jpg
but on the new one it would look something like:
/A
so I needed to rewrite the old URLs in order to keep the old images displayed, which took a lot of failed attempts (including nice results like redirect loops with hundreds of /images/images/images...), but I finally figured it out.
so here is how you can strip the query (?v= in this case) and add a directory to the URL:
Code: Select all
RewriteCond %{QUERY_STRING} ^v=(.*)$ [NC]
RewriteRule ^ /images/%1? [NC,L,R=301]
/?v=1.jpg
to:
/images/1.jpg