1

Insert root level directory for all image requests

view story
linux-howto

http://serverfault.com – I am working on a site migration and I need to set up some redirects for image files. Certain image path requests will come in to root-level subdirectories and I need to put /new_directory/ as the first directory for all of them, like so: Old site request -> new request website.com/dir1/image.png -> website.com/new_directory/dir2/subdir1/image.gif website.com/dir2/subdir1/image.gif -> website.com/new_directory/dir2/subdir1/image.gif Here's what I have so far, but it doesn't appear to be working. What am I missing? RewriteCond %{HTTP_REQUESTURI} (dir1|dir2|dir3)(.+?)(jpg|png|gif|j (HowTos)