CcHost5Documentation

From Creative Commons
Jump to: navigation, search

THIS IS A DRAFT PAGE - DO NOT TRUST ANY INFORMATION ON IT

Introduction

Understanding ccHost URLs

Understanding how URLs work in ccHost is a very important concept that you should understand before doing anything else. URL Parts

ccHost URLs are composed of four main parts:

1. Root URL of installation

2. Virtual Root

  • Don't worry if you don't know what a 'ccHost virtual root' is, we'll get to it here but for now assume it's the word media.

3. Command

  • This part of the URL maps to an internal command in ccHost. This can be anything from a request for a submit form, a feed, a record listing, etc. Examples are people which shows a listing of the latest registered users who have uploaded or files which lists the latest uploads.

4. Parameters

  • Many if not most commands accept and even require parameters. For example, adding a specific user's name to the people command will display the user's main page, e.g. people/rejon

You should refer to the ccHost Command Reference for a listing of all available commands.

If you have enabled 'pretty URLs' in your installation then all the elements are strung together into one URL:

http://example.com/media/people/rejon

If not, then everything starting from the virtual root is prepended the following way:

http://example.com?ccm=/media/people/rejon