Apache URL rewriting
You can optionally use Apache URL rewriting to have Cligs display sets of images with real path names, rather than ugly cgi get strings. This is much friendlier to search engines, easier for linking and just looks better.
Example 1
Jeremy hosts his website on his domain example.com. The document root is /home/jeremy/example.com/ and is already set up and working in Apache. His images are in the directory /home/jeremy/example.com/photography.
<Directory /home/jeremy/example.com/>
RewriteEngine On
RewriteBase /
# Fix up old cligs v1 links if necessary
RewriteRule ^(photography/.*):::(.*)$ /$1?$2 [R]
# Put slashes on the end of directories requested
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(photography/.+[^/])$ $1/ [R]
# Pass cligs the requested path as a cgi GET variable
RewriteRule ^(photography/.*)$ /cligs-2.0/?path=/$1 [QSA,L]
</Directory>
Security
Path access
By default, a web user can browse images and relative path names within your entire web server document root, but below. If this is undesirable then you need to tell cligs the highest paths to display, known as the root sets. This is done in the cligs-config.php file in the cligs install directory. The default is:
<?php
$this->roots[] = $_SERVER['DOCUMENT_ROOT'] . '/';
?>
you can specify your own root sets like this:
<?php
$this->roots[] = '/home/jeremy/example.com/photography';
$this->roots[] = '/home/jeremy/example.com/artwork';
?>
Image cache
If your images are private and are protected by some kind of access control, you need to ensure the cligs image cache is also protected as it will contain copies of your images. The easiest way to do this is to deny all web access to this path using a .htaccess file as direct access is unnecessary for cligs to work.