Hi all !
I need something that I can't do with the actual version of ispcp... (nightly 20070627)
Some of my customer's websites have several domain names for the same content. If I add domain aliases, I have the choice between take another document_root or make a redirection. The solution seems to be the second case, because another document_root is not appropriate for a unique website.
But in some case, we don't want a redirection ! We want keeping the url with the domain alias (we can have several reasons for that... web indexing, dynamic content based upon the domain...)
So what I want is the possibility to define a domain alias with a mount point like "/" and also to have several domain aliases with the same mount point !
In order to have this working, I make two little modifications by shortcutting the checks in the web admin :
Code:
file /var/www/ispcp/gui/include/input-checks.php line 409 :
if (($token) && (!chk_username($token, $num)))
file /var/www/ispcp/gui/reseller/add_alias.php line 203 :
// whe have alias with same mount point !!! ERROR
//$err_al = tr("There are alias with same mount point");
It seems to be good for me... but I still have a problem : I think that you must have a good reason to forbidden this configuration ! And I don't find any answer about it.
I only see one bug with this method : when I create a domain on an existing mount point, the document_root seems to be overridden by the default content, and if I delete one of the aliases, the document_root will be erased.
But if this is the only problem, I think that it is not very difficult to check if another alias use the same mount point, and in this case to not overridden/erase the document_root.
Thanks.