title: How to redirect IP to https://domain in .htaccess
body: <p>My websites open with IP, But i need redirect IP to domain.</p>
  
  <p>I create project with Laravel framework.</p>
  
  <p>My server is <strong>Ubuntu 16.04</strong></p>
  
  <p>My .htaccess is: // This file is root folder</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine on
    RewriteBase /
  
    RewriteCond     %{SERVER_PORT} ^80$
    RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
  
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,QSA,NC,L]
  
    RewriteCond %{HTTPS_HOST} ^10\.10\.10\.10
    RewriteRule (.*) https://website.com/$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But this code not work with me.</p>
  
  <p>Thank you</p>