S
S
saletech2014-04-23 10:02:52
PHP
saletech, 2014-04-23 10:02:52

How to implement custom domains for user profiles from the server side?

On the php site, dynamic subdomains for user profiles will be configured via mod_rewrite (possibly nginx + mod_rewrite)
Please tell me how to correctly implement the ability to bind to an external domain profile from the server side. So that a user who previously used the username.site.com subdomain for the profile can log in to it at username.com. At the same time, username.site.com also changed to username.com in the address bar.
like a domain for a blog www.tumblr.com/docs/ru/custom_domains
or stores on prom.ua
can specify the username.com as an alias to the main site.com domain, and then parse it by url and return the desired content?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew Dabich, 2014-04-23
@dabich

CREATING DYNAMIC PADS...

A
asakasinsky, 2014-04-25
@asakasinsky

I understand that you need to park a domain like user-site.com on a subdomain like username.mainsite.com . Dynamic subdomains can be created following a great example from dabich. A long time ago, I implemented one project in the same way. True, I didn’t park custom domains then, but I studied this issue a little.
Suggested solution : raise NS servers on mainsite.com.
This requires at least two IP addresses, and recipes like these:
www.cyberciti.biz/faq/linux-unix-bind9-set-vanity-...
https://www.digitalocean.com/community/articles/ ho...
I would be glad if it helped.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question