Good day, I was wondering if there was a function i could call with the parameters (in PHP) or the general what i need to do to be able to create subdomains with folder forwarding. Thanks!
Have a look at http://www.ispconfig.org/downloads/manual_en/manual_kunde_en_src.htm#4_2_3 chapter 2.3.2. Is this what you're looking for?
Falko, that is exactly it BUT i want to be able to do it in PHP (in my php pages i should say), either by dabling in the ISP config tables or by importing some files and using the functions to add them. basically i want to write a script that will create me a subdomain when X event happens and so on.
if its just subdomains couldn't you use then mod_rewrite? sub.domain.com --> domain.com/sub or domain.com/script.php?sd=sub ?
A very valiant proposition. Just wondering if this would work in the sense of not having a A-name record, when test.example.com is looked-up in the dns would it not "fail" if i dont have a dns record set up and am only relying on the mod rewrite? i may be completely off base tho
You can create a wildcard entry for the subs and point it to the domain or your IP in the dns... Code: *.domain.com. IN A 1.2.3.4 Then in the apache config create something like this: Code: DocumentRoot /www/domain/html ServerName www.domain.com ServerAlias *.domain.com And then you only need a .htaccess with rewriting... something like this should work Code: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] RewriteCond %{HTTP_HOST} ^a(.*)-01\.domain\.com [NC] RewriteRule ^(.*) /A%1/$1 [L]