title: How to transform / remap URLs using .htaccess
body: <p>I want a redirection in my website.</p>
  
  <p>The old url looks like this :</p>
  
  <p><a href="http://www.example.com/Prem_Ratan_Dhan_Payo/Prem_Leela.html" rel="nofollow">http://www.example.com/Prem_Ratan_Dhan_Payo/Prem_Leela.html</a></p>
  
  <p>Now we have to 301 redirect it to </p>
  
  <p><a href="http://example.com/songs/prem-leela/" rel="nofollow">http://example.com/songs/prem-leela/</a></p>
  
  <p>In total I have to </p>
  
  <ol>
  <li>Check if the url end with .html then we will redirect it other wise let it pass.</li>
  <li>remove .html from end.</li>
  <li>make all letters in lower case.</li>
  <li>change underscore to hyphen.</li>
  <li>change second segment to 'songs'.</li>
  </ol>
  
  <p>Please help me.</p>