<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.creativecommons.org/index.php?action=history&amp;feed=atom&amp;title=Cchost%2Fconcepts%2FVirtual_Roots</id>
		<title>Cchost/concepts/Virtual Roots - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.creativecommons.org/index.php?action=history&amp;feed=atom&amp;title=Cchost%2Fconcepts%2FVirtual_Roots"/>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Cchost/concepts/Virtual_Roots&amp;action=history"/>
		<updated>2026-05-09T13:41:15Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Cchost/concepts/Virtual_Roots&amp;diff=19723&amp;oldid=prev</id>
		<title>Fourstones: New page: Category:ccHost Category:ccMixter Category:Developer Category:Software Category:Technology {{cchost_head}} {{lowercase}}  Your ccHost site can be configured to look lik...</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Cchost/concepts/Virtual_Roots&amp;diff=19723&amp;oldid=prev"/>
				<updated>2008-11-12T10:39:16Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/wiki/Category:CcHost&quot; title=&quot;Category:CcHost&quot;&gt;Category:ccHost&lt;/a&gt; &lt;a href=&quot;/wiki/Category:CcMixter&quot; title=&quot;Category:CcMixter&quot;&gt;Category:ccMixter&lt;/a&gt; &lt;a href=&quot;/wiki/Category:Developer&quot; title=&quot;Category:Developer&quot;&gt;Category:Developer&lt;/a&gt; &lt;a href=&quot;/wiki/Category:Software&quot; title=&quot;Category:Software&quot;&gt;Category:Software&lt;/a&gt; &lt;a href=&quot;/wiki/Category:Technology&quot; title=&quot;Category:Technology&quot;&gt;Category:Technology&lt;/a&gt; {{cchost_head}} {{lowercase}}  Your ccHost site can be configured to look lik...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ccHost]]&lt;br /&gt;
[[Category:ccMixter]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Technology]]&lt;br /&gt;
{{cchost_head}}&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
&lt;br /&gt;
Your ccHost site can be configured to look like many different sites with just a few menu selections and no changes to your web server configuration.&lt;br /&gt;
&lt;br /&gt;
=Why?=&lt;br /&gt;
Why do this? Let's say you are running a remix community as your main site but also want to run a contest or you mainly run contests and you also want to have a personal 'media weblog' on the side -- or -- whatever.&lt;br /&gt;
&lt;br /&gt;
Most configuration settings in ccHost are specific to each virtual root. That means each virtual root can have it's own skin, it's own menus, home page, admins, page content, navigator tabs, rules for file naming, MP3/ID3 tagging, etc., etc.&lt;br /&gt;
&lt;br /&gt;
By default a virtual root will inherit settings from the main root (media) until you override them. This is a very powerful feature but can lead to plenty of confusion if not taken into account when dealing with virtual roots. (Prediction: you will forget this admonition, then you'll get frustrated, then you'll remember it and we can say 'I told you so.')&lt;br /&gt;
&lt;br /&gt;
=Default Virtual Root ('media')=&lt;br /&gt;
The default virtual root is called '''media'''. You can not delete this root, you can add your own. Every ccHost command in a URL starts with the virtual root. If you don't supply one then '''media''' is assumed.&lt;br /&gt;
&lt;br /&gt;
For example, for sites with pretty URLs turned off:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com?ccm=/media/submit&amp;lt;/nowiki&amp;gt; // pretty URLs off&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/media/submit&amp;lt;/nowiki&amp;gt;      // pretty URLs ON&lt;br /&gt;
&lt;br /&gt;
Is the same as&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com?ccm=/submit&amp;lt;/nowiki&amp;gt;  // pretty URLs off&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/submit&amp;lt;/nowiki&amp;gt;       // pretty URLs ON&lt;br /&gt;
&lt;br /&gt;
However, if you want to execute the '''submit''' command in another virtual root you'll have to specify that:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com?ccm=/my_virtual_root/submit&amp;lt;/nowiki&amp;gt;  // pretty URLs off&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/my_virtual_root/submit&amp;lt;/nowiki&amp;gt;       // pretty URLs ON&lt;br /&gt;
&lt;br /&gt;
==Name Conflicts==&lt;br /&gt;
If you [[cchost/concepts/Content|create a document]] called ''bobby'' you can view the file with:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/media/docs/bobby&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Since '''media''' is the default virtual root you can also see it with:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/docs/bobby&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since '''docs''' is the default command you ''also'' see it with:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/bobby&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can see why naming your virtual root '''bobby''' will be a conflict. If you did that, ccHost would consider the URL above to be a request to go the home page of the '''bobby'''&lt;br /&gt;
&lt;br /&gt;
It would be equally bad to call your virtual root '''docs''' (or any other [[Cchost/concepts/Commands|command]] for that matter) because you would be disabling that command for the '''media''' root (the virtual root has precedence).&lt;br /&gt;
&lt;br /&gt;
=Creating a Virtual Root=&lt;br /&gt;
&lt;br /&gt;
To create a new virtual root go to ''Global Settings'' -&amp;gt; ''Virtual ccHost'' (or browse to '''admin/cfgroot'''&lt;br /&gt;
&lt;br /&gt;
The only initial requirement will be the core name of the new virtual root. Make it a good one because it will be seen in many hundreds of URLs. Make it short, lowercase, alpha only, easy to type ('aqz' is not easy to type, try it) but descriptive like 'albums' or 'cindysart'.&lt;br /&gt;
=See Your Virtual Root=&lt;br /&gt;
After naming the virtual root you can then use that name in the URL address to access it. For example, let's say you name your new root myroot, to access that root simply tack it on to the domain and directory:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com?ccm=/myroot&amp;lt;/nowiki&amp;gt; // Pretty URLs off&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;http://example.com/myroot&amp;lt;/nowiki&amp;gt;      // Pretty URLs ON&lt;br /&gt;
&lt;br /&gt;
=Setting Properties in a Virtual Root=&lt;br /&gt;
#Log in as admin (if not already)&lt;br /&gt;
#Click on ''Manage Site''&lt;br /&gt;
#Select your virtual from the drop-down at the top of the form&lt;br /&gt;
&lt;br /&gt;
You will now be setting configuration values for your virtual root.&lt;br /&gt;
&lt;br /&gt;
=Deleting a Virtual Root=&lt;br /&gt;
&lt;br /&gt;
#Log in as an admin (if not already)&lt;br /&gt;
#Click on ''Manage Site'' (or browse to '''admin/site/local''')&lt;br /&gt;
#Select the virtual root from the ''Edit the settings for virtual root'' drop down &lt;br /&gt;
#click on the ''Delete this virtual root'' button&lt;br /&gt;
=Developers=&lt;br /&gt;
&lt;br /&gt;
==Determining the Current Virtual Root==&lt;br /&gt;
The ccHost runtime will put the current virtual root into a global called '''$CC_GLOBAL_ROOT'''.&lt;br /&gt;
&lt;br /&gt;
So if you code is saving some root specific data, say to a browser cookie:&lt;br /&gt;
&lt;br /&gt;
  global $CC_CFG_ROOT;&lt;br /&gt;
 &lt;br /&gt;
  $data['last_vroot'] = $CC_CFG_ROOT;&lt;br /&gt;
  &lt;br /&gt;
This global is available by the time the CC_EVENT_APP_INIT event is triggered.&lt;br /&gt;
&lt;br /&gt;
==Saving Root Specific Settings==&lt;br /&gt;
Read [[Cchost/developer/Common_HOWTO's#Saving_and_retrieving_system_configuration_data|this section]] in order to save your own custom configuration settings into different virtual roots.&lt;/div&gt;</summary>
		<author><name>Fourstones</name></author>	</entry>

	</feed>