Question

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

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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?