Question

map my purchased domain name to a sub folder of my site

  • Posted January 25, 2015

hello all:

I purchased a domain name from another vendor, say the domain name is: mynewproduct.com, now I want to map it to a sub folder of my site, say, mysite.com/mynewproduct, how can I manage to do it?

as of now, when I type in “mynewproduct.com” it shows: “Could not determine user from environment

thanks, Jon

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

First you will want to point your new domain name to your droplet’s IP address.

Then you’ll want to set up a virtualhost entry for the new domain pointing it to the directory you want.

Once these two things are done you should be all set. You may need to change the paths in some of your files as when using your new domain the files would be located at mynewproduct.com rather than mysite.com/mynewproduct

thanks ryanpq. I followed the steps you suggested, and when I type in mynewproduct.com, i got this: The requested URL /cgi-sys/defaultwebpage.cgi was not found on this server. I guess that’s because I didn’t do what you said “You may need to change the paths in some of your files as when using your new domain the files would be located at mynewproduct.com rather than mysite.com/mynewproduct

However, if I just want to simply re-direct to mysite.com/mynewproduct when typing in in browser: http://mynewproduct.com, what should I do? maybe I just need to update .htaccess with a re-direct?