fighnight Posted June 28, 2008 Share Posted June 28, 2008 Hi guys, I am creating an RPG and my users have 2 ways to get to my site. One of the url is host/mydomain.com and this one creates all the errors. Second one is mydomain.com and this has no errors. I was wondering is it possible for me to only let the users view from the mydomain.com? Link to comment https://forums.phpfreaks.com/topic/112353-solved-url-help/ Share on other sites More sharing options...
papaface Posted June 28, 2008 Share Posted June 28, 2008 if ($_SERVER['SERVER_NAME'] != "mydomain.com") header('Location: mydomain.com'); Might work. Link to comment https://forums.phpfreaks.com/topic/112353-solved-url-help/#findComment-576850 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2008 Share Posted June 28, 2008 if your webhost/server whatever has a Cpanel or some sought of control panel you can setup redirects to handle this problem. Regards ACE Link to comment https://forums.phpfreaks.com/topic/112353-solved-url-help/#findComment-576981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.