'Safely escape period/dot (.) character in .htaccess mod_rewrite regex

I have a .htaccess file that is used by an advanced SEO URL php system installed on my osCommerce site.

It has the following rules that work just fine for most cases, but removing periods from my GET parameters:

  RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
  RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]

So URL like this:

http://example.com//index.php?cPath=44_95&page=1&range=1.99_2.99

gets rewritten according to the rule and the 1.99_2.99 becomes 199_299.

How can I escape the period safely? (ie. without causing some random side effects)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source