admin管理员组文章数量:1389897
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 not to 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. Yoast Premium has a redirection module that can accept regular expressions.
Can anyone suggest a regex that will work?
本文标签: redirectRegex expression for redirecting image URLs to another folder
版权声明:本文标题:redirect - Regex expression for redirecting image URLs to another folder 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744609452a2615561.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论