[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Dynamically setting PageDir
I must have had a typo earlier. This works fine:
PageDir /www/__DOMAIN_NAME__/htdocs/ic
PageDir <&EOF
sub {
if ($ENV{HTTP_HOST} =~ /^(bill|joe|sally|frank)/) {
return qq{/home/$1/www/__DOMAIN_NAME__/htdocs/ic};
}
return q{/www/__DOMAIN_NAME__/htdocs/ic};
}
EOF
It would be nice if the include tag could read a file relative to PageDir.
Bill Carr
Worldwide Impact
bill@worldwideimpact.com
413.253.6700
bill@worldwideimpact.com
Sent by: interchange-users-admin@developer.akopia.com
05/17/2001 10:49 AM
Please respond to interchange-users
To: interchange-users@developer.akopia.com
cc:
Subject: [ic] Dynamically setting PageDir
How can I set the PageDir based on the $ENV{HTTP_HOST}?
>From catalog.cfg
This works:
VendURL http://__SERVER_NAME____CGI_URL__
VendURL <&EOF
sub {
return "$ENV{HTTP_HOST}__CGI_URL__";
}
EOF
But this does not:
PageDir /www/__DOMAIN_NAME__/htdocs/ic
PageDir <&EOF
sub {
return q{/www/__DOMAIN_NAME__/htdocs/ic} if ($ENV{HTTP_HOST} =~
/^(www|devo)/);
return qq{/home/$1/www/__DOMAIN_NAME__/htdocs/ic} if ($ENV{HTTP_HOST}
=~ /^(bill|eli|fyl|larry)/);
return q{../htdocs/ic};
}
EOF
I have set up a separate development environment for each of our
developers. Each developer has their own IC catalog. The only differences
between the developer catalogs is the PageDir. I would like to eliminate
the separate developer catalogs and just set the PageDir on the fly based
on the requested URL. If the requested URL is bill.worldwideimpact.com/ic
then the PageDir should be /home/bill/www/worldwideimpact.com/htdocs/ic.
Bill Carr
Worldwide Impact
bill@worldwideimpact.com
413.253.6700
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users