Hi,
I'm setting up a new server to move a website to. I've installed apache, php, mysql, phpmyadmin etc succesfully and everything is running smoothly.
I now copied the files from the old location to the new location, but I don't want to point the DNS to the new server just yet. I'd like to first test thoroughly if everything will work.
So to test, I can only work with the ip-address, for example
http://10.0.0.1/ .
Now the problem is that the company who wrote the code for the website implemented a manual check to see if the user is browsing to
http://domain or
http://www.domain. If the first is true, it forwards it to
www.domain, which in this case would become
http://www.10.0.0.1/.
My question is: Is there a way to make this work, as at the moment this does not work. I'm kind of guessing it's bad practice to have this coded in php and it should be in .htaccess file instead, but hey, this is what I'm working with, so if there is a solution I'd be very happy to hear it.
Thanks already for your help!
Regards,
Wout