timetraveller92 -8 Light Poster Banned

I've got a domain-name that points to one IP
When user types the domain name it should point to subdirectory's index.php
When user type ip address it should open the index.php in root

Anyone knows how to perform this? I've been using javascript top.location and even htaccess can't seem to make it work.Struggling to make it work, can you advise? X_X

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.