scarhand Posted November 18, 2010 Share Posted November 18, 2010 how would i go about doing this? lets say i want to use different domains i.e.: mysite.com mycoolsite.com but i want them to both use the same php script i.e.: myscript.com/site.php?domain=mysite.com each site will show different content depending on the domain $_GET variable... can anyone help me with this? Quote Link to comment Share on other sites More sharing options...
seanlim Posted November 18, 2010 Share Posted November 18, 2010 i'm guessing the php script on mysite.com and mycoolsite.com will just have to fopen("http://myscript.com/site.php?domain=...") or am i missing something? Quote Link to comment Share on other sites More sharing options...
kahodges Posted November 18, 2010 Share Posted November 18, 2010 You could use a .htacess file to redirect your domain to any script located on the same domain, or a different domain. Quote Link to comment Share on other sites More sharing options...
scarhand Posted November 18, 2010 Author Share Posted November 18, 2010 the problem is i want to have it so that: mysite.com/subpage would point to: myscript.com/?domain=mysite.com&page=subpage Quote Link to comment Share on other sites More sharing options...
seanlim Posted November 19, 2010 Share Posted November 19, 2010 Never tried it before, but mod_rewrite might work? I think there's a proxy option too so mysite.com can act as a proxy to your second site. Then use RewriteRule to format the URL whichever way you want... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.