PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If you own both the domain names and you're having the single location for both these domains then you use $_SERVER['HTTP_HOST'] to check for the domain and redirect accordingly.