Support » Plugin: Redirection » Regex expression for redirecting image URLs to another folder

  • Resolved George

    (@quantum_leap)


    I have changed the upload folder to a folder called “images” in the root folder by entering define('UPLOADS', 'images'); inside wp-config.php file. My Media settings had the images organized into month and year. I changed that to not use any date organization. I want to be able to redirect all previous image URLs that were in the form of siteroot/wp-content/uploads/2020/02/image.png to point to the new folder, like this siteroot/images/image.png. Not all images are PNGs, of course, I would need that to happen for every file inside the previous upload folder and subfolders! I can copy all existing individual images and other files into the images root folder but I am not sure how to set up the redirection.

    What I have now is this:
    Source URL: ^wp-content(.*)
    Target URL: /images/$1

    I am pretty sure, I am doing something wrong.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.