alex2008 Posted July 28, 2008 Share Posted July 28, 2008 Hi all, I need to know how to mask a domain either through htaccess or through code. Say suppose I am having a blog like this http://test.domain.com/ which is working fine. Now I had purchased a domain name alex2008 and I want to mask my blog url through code. like http://alex2008.com which is actually from http://test.domain.com. Any one trying test.domain.com will get the url as http://alex2008.com Thanks in advance Regards Alex Link to comment https://forums.phpfreaks.com/topic/116959-domain-masking/ Share on other sites More sharing options...
ignace Posted July 28, 2008 Share Posted July 28, 2008 so, you just want that whoever goes to test.domain.com is being referred to alex2008.com? if ($_SERVER['HTTP_HOST'] !== 'alex2008.com') { header("Location: http://www.alex2008.com"); } Link to comment https://forums.phpfreaks.com/topic/116959-domain-masking/#findComment-601464 Share on other sites More sharing options...
LemonInflux Posted July 28, 2008 Share Posted July 28, 2008 Your host should supply the ability to 'point' your domain at another domain. ---------------- Now playing: Enter Shikari - Closing via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/116959-domain-masking/#findComment-601465 Share on other sites More sharing options...
alex2008 Posted July 28, 2008 Author Share Posted July 28, 2008 can you briefly tell abt it??? Link to comment https://forums.phpfreaks.com/topic/116959-domain-masking/#findComment-601514 Share on other sites More sharing options...
xnowandtheworldx Posted July 28, 2008 Share Posted July 28, 2008 Just ask your host if they can "point" your domain to another website. Or if your running cpanel under the "Domains" section there is a link titled "Redirects" and from there you can redirect your whole domain to another website. Hope that helps a little. Link to comment https://forums.phpfreaks.com/topic/116959-domain-masking/#findComment-601529 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.