Pointer Domains that point to a sub directory of the main site?

Lets say I have www.domain.com as a siteworx account. Is it possible to create www.domain2.com and have it point to www.domain.com/folder?

[SIZE=2]With version 2.1.2, no it isnt (at least not using the control panel), however that would be nice.[/SIZE]

Like RnR said no way that I know of via SiteWorx or NodeWorx…

You could “hack it” with a PHP header redirect.

Just point domain2.com to the same IP where domain.com is and then have the “index.php” check the Host name. Where index.php is the first file always loaded and home.php is the main page of the domain.com site.

index.php


<?php
if($_SERVER["HTTP_HOST"]== "www.domain2.com" || $_SERVER["HTTP_HOST"]== "domain2.com") {
header("location: www.domain2.com/folder");
exit;
}
else {
 header("location: home.php");
}
?>

This should work if this account is on a dedicated IP.

If not you probably can add the domain2.com to the vhost alias
ServerAlias www.domain.com ftp.domain.com www.domain2.com domain2.com

Although once you get to that level you might as well just do a apache rewrite stuff.

hope this helps

We are using this rewrite rule for sites on other server to point pointerdomains to a submap (you have to put it in the .htaccess file):


[SIZE=1][SIZE=1]# Begin Domain Alliassing
#---------------------------------------------
RewriteEngine On
#---------------------------------------------
[/SIZE]# domain.com
RewriteCond %{HTTP_HOST} domain.com$ [NC] 
RewriteCond %{REQUEST_URI} !^/map/.*$ 
RewriteRule ^(.*)$ /map/$1
[/SIZE]

[SIZE=1]

where “map” is your map in the main html dir where the domain should point to.

Greets, R?mon
[/SIZE]