having domain pop when ip is typed in address bar

squid44th

Verified User
Joined
Jul 9, 2015
Messages
6
I have assigned an IP to a specific user with a domain. what I want to know how to do is set it up so that when domain.com OR xx.xx.xx.xx is typed in it comes up domain.com. IP is assigned to user.

Also would like the admin's domain to come up when shared IP is typed in. How to set those up?
 
As to your first question, use this:
https://help.directadmin.com/item.php?id=261

As for the second question, there are more possibilities, but you could place a redirect in the index.html in /var/www/html/index.html but this might be overwritten when recompiling apache, so there might be better solutions, however I can't help you there.
Or use a .htaccess in /var/www/html which redirects to admin's domain when index.html is called.
 
Hello,

If IP is assigned to user then DocumentRoot points to public_html of that user's default domain. So you can use mod_rewrite in .htaccess and set a redirect to the domain.
 
Back
Top