Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
346 views
in Technique[技术] by (71.8m points)

.htaccess - Linking custom domain to profile url

Good morning to all,

I have developed a React application allowing users to have a profile page. I absolutely need my customers to be able to link their domain name, " custom.com " for example, to their profile page " mydomain.com/customuser " for my application to make sense, but I don't have a lot of skills in all that ...

My application is hosted on Netlify and by default my domain host allows me to use a .htaccess file. I'm thinking of using this .htaccess to have customuser.mydomain.com display the content of mydomain.com/customuser and then tell my customers to link their custom.com domain to customuser.mydomain.com.

I don't want customers to be redirected, visiting custom.com should display exactly the same as mydomain.com/customuser.

This leads me to my three questions:

  1. Is such a result possible?
  2. If so, is it a good idea to use my web host's .htaccess to do so?
  3. Finally, an idea of how to configure my .htaccess and the custom.com domain to achieve this ?

Thank you in advance for your help,

Kind regards


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...