P.S. At my first comment some code got stripped.

Add "IfModule mod_rewrite.c" to the beginning of the htaccess code with opening less-than and closing greater-than signs.

Add "/IfModule" to the end of the htaccess code with opening less-than and closing greater-than signs.