title: How can I redirect images in wordpress?
body: <p>I have two issues:</p>
  
  <p>1) I am trying to redirect images from one url to another url, but it's not working</p>
  
  <p>2) I have some images which are not now present in my website. When I try to open that URL, it is redirecting <code>404 Not Found Nginx</code> . I want to redirect it to home page.</p>
  
  <p>I have tried the following codes</p>
  
  <pre><code>###### BEGIN WP_OPTIMIZE_BY_XTRAFFIC_CONFIGS_WP-OPTIMIZE-BY-XTRAFFIC ######
  Options -Indexes
  ###### END WP_OPTIMIZE_BY_XTRAFFIC_CONFIGS_WP-OPTIMIZE-BY-XTRAFFIC ######
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
  RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteRule . /index.php [L]
  ErrorDocument 404 https://tabc.com (Not Working)
  #Also Tried this, not working
  RewriteCond %{REQUEST_URI} !(test\.html|\.png)$ [NC]
  RewriteRule .* /tabc.com  [L]
  RedirectPermanent /wp-content/uploads/image.gif http://www.tabc.com/path/ 
  &lt;/IfModule&gt;
  
  
  # END WordPress
  
  # php -- BEGIN cPanel-generated handler, do not edit
  # Set the “ea-php54” package as the default “PHP” programming language.
  &lt;IfModule mime_module&gt;
    AddType application/x-httpd-ea-php54 .php .php5 .phtml
  &lt;/IfModule&gt;
  # php -- END cPanel-generated handler, do not edit
  </code></pre>