Installing

Note: this guide assumes you have some knowledge of running a website, so if you are unsure of a step, please ask your host

Downloading

First follow the steps below to download the files

Setting everything up

Once the files have been copied to your chosen location on the server, follow the steps below to set it up

Configuring your webserver for short URLs

Everything should now be set up correctly, but there are some further steps below if you want to use short URLs with lighttpd/Apache

Lighttpd

If the script is installed in the root directory of the webserver, add the following to your lighttpd.conf file

$HTTP["host"] == "domain.com" {
	url.rewrite = ( "^/([a-zA-Z0-9]{5})$" => "/view.php?id=$1" )
}

$HTTP["host"] == "i.domain.com" {
	server.document-root = "/path/to/upld/script/from/root/images/"
}

If your script is installed in a folder, and not the root directory of your webserver, amend the following and add it to your lighttpd.conf file

$HTTP["host"] == "domain.com" {
	# if you have the scripts in a folder, i.e. "folderName" then use amend the rule like below
	url.rewrite = ( "^folderName/([a-zA-Z0-9]{5})$" => "/folderName/view.php?id=$1" )
}

$HTTP["host"] == "i.domain.com" {
	server.document-root = "/path/to/upld/script/from/root/folderName/images/"
}

Apache

Add the following to your Apache config file

<VirtualHost *:80>
    DocumentRoot /path/to/upld/script/from/root/images
    ServerName i.domain.com
</VirtualHost>