title: .htaccess underscores to hyphens not working in my web server
body: <p>I have seen many sample/tutorial regarding my case but when i use their working code, it's not doing anything to my URL.</p>
  
  <p>I want to make this link example/lmp/property/jumeirah_parklarge_legacy_4brms/V0004221/ to example/lmp/property/jumeirah-parklarge-legacy-4brms/V0004221/</p>
  
  <p>I also test the .htaccess code in <a href="http://htaccess.madewithlove.be/" rel="nofollow">http://htaccess.madewithlove.be/</a> and it gives me the right output URL but when test on my local server it doesn't redirect me to output URL.</p>
  
  <p>Here's my code, </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      Options +FollowSymlinks
      RewriteEngine on
      RewriteBase /lmp
  
  
      RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5-$6-$7 [L,NC,E=underscores:Yes]
      RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5-$6 [L,NC,E=underscores:Yes]
      RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5 [L,NC,E=underscores:Yes]
      RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4 [L,NC,E=underscores:Yes]
      RewriteRule ^lmp/property([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3 [L,NC,E=underscores:Yes]
      RewriteRule ^lmp/property([^_]*)_(.*)$ lmp/property$1-$2 [L,NC,E=underscores:Yes]
  
      RewriteCond %{ENV:REDIRECT_underscores} ^Yes$
      RewriteRule ^([^_]+)$ lmp/$1 [R,L]
  
  
  
      RewriteCond %{REQUEST_URI} ^../system.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
  
      #When your application folder isn't in the system folder
      #This snippet prevents user access to the application folder
      #Submitted by: Fabdrol
      #Rename 'application' to your applications folder name.
  
      RewriteCond %{REQUEST_URI} ^../application.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
  
      #Checks to see if the user is attempting to access a valid file,
      #such as an image or css document, if this isn't true it sends the
      #request to index.php
  
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?/$1 [L]
  
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index.php/?([^\ \?]*) [NC]
      RewriteRule ^ %1/%2 [R=301,L]
  
  &lt;/IfModule&gt;
  &lt;IfModule !mod_rewrite.c&gt;
  
      ErrorDocument 404 /home
  &lt;/IfModule&gt;
  </code></pre>