I'm new to using and changing the workings of a server and all that. So far I've only had one server with one domain for myself, but now a business is getting some traction and I want to use a different domain for it while keeping it on my server.
The situation is like this:
I have the main domain and root directory like maindomain.com. I also just bought projectdomain.com.
The files for projectdomain.com are within maindomain.com/project/.
I have established a forward from projectdomain.com to maindomain.com/project/ already, but I can't access sites via the url.
For example:
I wan't to type projectdomain.com/somecontent/ and access maindomain.com/project/somecontent while maintaining the projectdomain.com link in the adress bar.
When I try it now I always end up in maindomain.com/project/ and never in the file I specified in the url.
I've tried working around it with the .htaccess file, but don't really know much about it. What I have now is
RewriteEngine On
RewriteCond %{HTTP_HOST} (www\.)?projectdomain.com
RewriteRule (.*) http://maindomain.com/project/$1 [R=301,L]
Sorry for the noob question, I really don't know much about the topic and I'm not sure what to google to get what I want.