Answer the question
In order to leave comments, you need to log in
How to hide the IP address of the server in the address bar of the site?
There is a VDS, on it CMS Prestashop and presumably Apache (CMS was installed out of the box). When you enter the site's domain in the address bar, the site opens and the server's IP address appears in the address bar. It is also possible to access the site by entering the IP address of the server in the address bar.
Please tell me how to make it so that you can only access the site's domain and block the opening by the server's IP address?
And how to make sure that the address bar of the site does not display the server's IP address when navigating through the pages of the site, but always displays only the domain name?
Answer the question
In order to leave comments, you need to log in
if apache then in .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} !^mysite.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
if ($http_host !~ "^mysite.com$"){
rewrite ^(.*)$ http://mysite.com$1 redirect;
}
configure Apache to receive only from the domain and that's it) how? write to hosting support - you can’t just tell
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question