I am redirecting my URL to https with htaccess using this directives:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoled.com/$1 [R=301,L]
It works Ok.
I need to do the same except with 127.0.0.1 while I develop PHP on XAMPP, so I added this condition:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} !^127.0.0.1
RewriteRule ^(.*)$ https://www.yoled.com/$1 [R=301,L]
But it continues sending the URL to https://www.yoled.com instead of using 127.0.0.1/index.php.
How can I set a RewriteCond for 127.0.0.1?
Thank you.