title: Removing whitespaces or %20 in url using htaccess
body: <p>hi guys can you help me here im having a little trouble here im tring to use the htaccess to remove all 20% in my url and replacing it with hyphen I manage to get rid the other 20% in between the words Acer,Liquid,S1,S510</p>
  
  <p>here is my url <strong>/localhost/gadgets/product/Acer-Liquid-S1-S510%20Mobile</strong></p>
  
  <p>As you can see there is one %20 in last part, how can I remove it</p>
  
  <p>And here is my htaccess</p>
  
  <pre><code>Options +FollowSymLinks -MultiViews
  
  RewriteEngine On
  RewriteBase /gadgets/
  
  Options -Indexes
  
  RewriteRule ^brand/([a-zA-Z]+)$ brand.php?id=$1
  
  RewriteRule ^product/([A-Za-z0-9-]+)/?$   product.php?product_name=$1-$2 [NC,L]
  
  RewriteRule ^(.*/|)[\s%20]+(.+)$ $1$2 [L]
  
  RewriteRule ^(.+?)[\s%20]+(/.*|)$ $1$2 [L]
  
  RewriteRule ^([^\s%20]*)(?:\s|%20)+(.*)$ $1-$2 [L,R]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  
  RewriteRule ^(.*)$ $1.php
  </code></pre>
  
  <p>Thanks in advance guys</p>