Вы могли бы посмотреть на:
контейнер стандарта Осмотра (станд.:: карта) содержание с gdb
Your condition will never be true, because its like "if (a == a + b)".
I'd try the following:
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^.*$ https://%1/$1 [R=301,L]
This will capture "google.com" from "www.google.com" into %1, the rest in $1 and after that combining the 2, when HTTP_HOST starts with www (with or without https).