Alistair Ewing wrote:


We've set the .co.uk site up with a separate IP address and dealt with it as a separate VirtualHost in our Apache configuration. Any idea how we can call an alternate XSL transformation for our .co.uk site? Can we pass parameters (say the host string) to the XSL stylesheet? Can we configure AxKit to call different stylesheets for different hosts?

Should be easily done using your existing VirtualHost directives to determine which style transformation is applied. Consider the following (using a single IP vhost setup here, adjust as needed) that would apply the en_us.xsl stylesheet to requests to the .com address while applying the en_uk.xsl stylesheet to requests served from .co.uk:


NameVirtualHost 111.22.33.44

# .com host
<VirtualHost 111.22.33.44>
  DocumentRoot /path/to/content
  ServerName yourhost.com
  AxAddProcessor /styles/en_us.xsl
</VirtualHost>

# .co.uk host
<VirtualHost 111.22.33.44>
  DocumentRoot /path/to/content
  ServerName yourhost.co.uk
  AxAddProcessor /styles/en_uk.xsl
</VirtualHost>

Note that both hosts share the same DocumentRoot. This should do the trick. Write back if you get stuck.

-kip


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to