Welcome Guest, Not a member yet? Register   Sign In
How do sites use other people sub domains to run their site through?
#2

(03-21-2016, 06:58 PM)PaulD Wrote: Hi,

I had a service from a company where I set up a sub domain for my website, and their service ran on it. It was a social media writing service, where I charged people to use the service, and they used it on my website, but via a sub domain (something like SEO.mydomain.co.uk) and to all intents and purposes they thought it was my service.

For a site I am working on now, I have just had the idea that this would be a great thing to offer. But have no idea how to do it.

I set up a subdomain on another site, and tried to do it, but it just is not that simple. The very first link they click takes them to the real site, not the faked one.

Would I need a script (possibly a pre-controller hook) that changes the base_url and site_url based on the requesting domain, or something like that. Is that the way to go to achieve this? Are there issues with cookies, or CSRF problems? I am guessing there will be issues there too.

It is just an idea I am toying with but would love to get the experiment going. Right now it just does not work in anywhere near an acceptable way at all.

Any insights or suggestions or explanations would be very warmly welcomed.

Thank you in advance,

Paul.

I'm not sure I understand your question, but I think you're looking for wildcard subdomains?

Nginx:
http://serverfault.com/questions/249952/...s-on-nginx

Apache: 
http://stackoverflow.com/questions/75835...-subdomain
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply


Messages In This Thread
RE: How do sites use other people sub domains to run their site through? - by albertleao - 03-21-2016, 07:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB