- 
		
I’m having trouble setting up redirects for image files located in the /wp-content/uploads/ folder using RankMath’s redirection feature and custom .htaccess rules.
I’m trying to redirect old image URLs (e.g., /wp-content/uploads/2015/10/RusticMilano6AA.jpg) to the homepage (https://www.samleisure.co.uk). However, instead of the redirects working, I keep getting 404 errors when accessing those URLs.
What I’ve Tried:
1. RankMath’s Redirection Feature: Initially, I attempted to use RankMath’s built-in redirection tool, but it seems it cannot handle redirects for static files located in the /wp-content folder.
2. .htaccess Manual Redirects:
I added 301 redirects manually to the .htaccess file using the following format:Redirect 301 /wp-content/uploads/2015/10/RusticMilano6AA.jpg https://www.samleisure.co.uk
I also tried using RedirectMatch to apply rules to all files in /wp-content/uploads/:
RedirectMatch 301 ^/wp-content/uploads/.*$ https://www.samleisure.co.ukCould you provide guidance on resolving this issue using RankMath or advise on any possible conflicts or limitations with redirecting static files?
Thanks in advance,
Mike 
The ticket ‘Redirections not working’ is closed to new replies.
