Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Multiple domains on one IP

Elite Diviner
Joined
Aug 15, 2008
Messages
489
Reaction score
43
I don't really know where this belongs, but I assume this can be done with .htaccess so it's atleast somehow related to coding.

Basically, I've got 2 domains. My primary domain points to /www/html/ folder where are all the files for that website.
Now, I want to have my second domain to take to a different folder inside the /www/html/, this domain would be called "second".

What I tried was I created a .htaccess file in the /www/html/ and added this.
Code:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com
RewriteCond %{REQUEST_URI} !second/
RewriteRule ^(.*)$ second/$1 [L]
Which should redirect the second domain into a folder "second".
Whenever I enter my second domain, it takes me to exactly the same place as the primary one despite of the .htaccess being there.

I've been trying to google this but with no results. I found out about the .htaccess thing through google, but that didn't help me at all.
 
Back
Top