Ariadne can host multiple sites in one tree. Each site can have it's own administrator, designer, users, etc. You can map domain names directly to the site in Ariadne, this will keep your site url's short and easy to remember.

We currently haven't researched how to do this with Microsoft's IIS webserver, so the following tutorial will only work with Apache.

Configuring Ariadne

For the tutorial we will assume there is a psite object at /sites/example/ in the Ariadne tree. Edit this object and enter the root url of this site, e.g. This url will from now on be used by Ariadne whenever the function make_url() is called, either in your own object (pinp) templates, or in class (system) templates. This means that all links generated by Ariadne will use this site url as a base, unless the link points outside the site directory, or is part of a new psite.

If you do not have Apache set up to redirect requests for this url to Ariadne, this will break your site, keep the URL empty if you can't configure Apache, Ariadne will then use the generic urls, e.g.:

Configuring Apache using Alias 

Alias is a very easy way to redirect requests to Ariadne, however it has some drawbacks. If your site is multilingual, or uses sessions, alias isn't sufficient. Otherwise this wil work well enough:

    DocumentRoot /var/www/yoursite
    Alias / /ariadne/loader.php/sites/example/
    ErrorLog /var/log/apache/
    TransferLog /var/log/apache/

You can now either access the Ariadne backend via or add another virtual host,, which has as Documentroot /var/www/yoursite/ariadne/.

Using the rewrite engine

To do the same for multilingual websites or a website where you do need
sessions, you'll need the Apache rewrite engine. So instead of the Alias line in the previous example, you'll need some rewrite magic:

  RewriteEngine on 
  # the RewriteCond excludes URL's which have 
  # already been rewritten once
  RewriteCond %{REQUEST_URI} !^/ariadne/
  RewriteRule ^(/-[^/]{4}-/|/)?([a-z]{2}/|/)?(.*) /ariadne/loader.php$1$2sites/example/$3

This rewrite rule matches with all the different types of requests, whether or not the language selection or a session id are in the URL. Session id's are recognized by the fact that they're always first in the URL and start and end with a '-'. The language selection is recognized by the fact that is always a code of two letters. This means that you should not create directories or other objects with a filename consisting of two letters (or other characters) as this rewriterule will break that.

The RewriteCond makes sure that URL's that have been rewritten once, won't be rewritten again. It also makes it possible to access the Ariadne back end of the site via the URL ''. To stop this behaviour, simply change the RewriteCond lines to:

  RewriteCond %{REQUEST_URI} !^/ariadne/loader.php/ 

Using a PHP wrapper.

You can use the small siteloader script below to do the rewrite, this works with any webserver where you can configure the document root.

  wrapper for loader.php
  Simplifies Apache rewrite
  Gabriel Wicke <2002 at>
  Copy it to the same directory as loader.php
  (usually 'www') and point the document root 
  to /full/path/to/siteloader.php/site/[enter the full
  ariadne path of the site here]/endsite/.
  Example document root: 
  if (eregi($re,$PATH_INFO,$matches)) {
  if (eregi($re,$PATH_INFO,$matches)) {
  $split=strpos(substr($PATH_INFO, 1), "/");
  $ldNLS=substr($PATH_INFO, 1, $split);
  if ($AR->nls->list[$ldNLS]) {
    // valid language
    $PATH_INFO=substr($PATH_INFO, $split+1);
  // uncomment this to switch on debug mode
  // debugon("all");