I use Apache web-server and I want to redirect all urls from ip to domain. Here is the content of my website .htaccess
file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L,NE]
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\s\S]*)$ index.php?rt=$1 [L,B,QSA]
According to some research, I guess I need something like this: (not sure)
RewriteBase /
RewriteCond %{HTTP_HOST} ^95\.216\.161\.63$
RewriteRule ^([\s\S]*)$ https://lamtakam.com/$1 [L,R=301]
But I don't know how (in which part) should I add those threelines to the .htaccess
file. Any clue?