Redirect Image to homepage

I want to Redirect Image path to my website homepage.
https://www.domainname.com/wp-content/uploads/2017/03/infographic.png this url to
www/domainname.com. I was trying to do with the code providing bellow

# WPhtc: Begin Custom htaccess

RewriteEngine On
RewriteCond %{HTTP_REFERER} !/wp-admin/ [NC]
RewriteRule ^wp-content/uploads/2017/03/.+?.(jpe?g|png|gif|svg)$ /home [R=301,L]

WPhtc: End Custom htaccess

But its not working

Read more here: Redirect Image to homepage

Leave a Reply

Your email address will not be published. Required fields are marked *