title: Replace space, %20 and + with hyphens
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5821120/301-redirect-with-spaces">301 Redirect With Spaces</a>  </p>
  </blockquote>
  
  
  
  <p>Right now I'm redirecting every Image hit to the html page which contains the image.</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC,OR]
  RewriteCond %{HTTP_REFERER} (bing.com|google|yahoo|stumbleupon.com|reddit.com|pinterest.com) [NC]
  RewriteRule (.*)\.(gif|jpg|png)$ /$1.html [R,L]
  </code></pre>
  
  <p>Since the Images often include spaces but the html pages always use hyphens, I need a solution to also replace all spaces, %20 and + symbols with hyphens</p>