# \[ANN\] Virtual Domain Extension 1.2.2

**URL:** <https://www.ruby-forum.com/t/ann-virtual-domain-extension-1-2-2/123064>\
**Category:** Radiant CMS\
**Created:** [December 13, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/ann-virtual-domain-extension-1-2-2/123064 "2007-12-13T19:40:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![twerth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@twerth](https://www.ruby-forum.com/u/twerth)\
**Post date:** [December 13, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/ann-virtual-domain-extension-1-2-2/123064/1 "2007-12-13T19:40:13Z")

</div>

It looks like this extension was no longer maintained and was  
incompatible with Radiant 0.6.4, so I’ve packaged up a fixed version.

[http://svn.devjavu.com/lexbrains/radiant\_extensions/virtual\_domain/tags/rel\_1-2-2/](http://svn.devjavu.com/lexbrains/radiant_extensions/virtual_domain/tags/rel_1-2-2/)

ABOUT VIRTUAL DOMAINS  
You can host multiple websites from a single instance of Radiant by  
matching the Host: portion of the request headers against a regular  
expression you specify. You need to set your homepage to be a  
‘Virtual Domain’ page type, and its immediate children will be used as  
the roots of the different sites you host. Full instructions are in  
the README.

Thanks  
-todd[1]

---

<div class="post-metadata">

**Author:** ![twerth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@twerth](https://www.ruby-forum.com/u/twerth)\
**Post date:** [December 13, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/ann-virtual-domain-extension-1-2-2/123064/2 "2007-12-13T23:33:41Z")

</div>

I am glad to see that someone has taken up this extension. It is  
really nice to support several sites with one installation of Radiant.  
I actually have several sites doing this.

One thing that has always bugged me was the caching problem. Usually,  
when saving the page, the cache is cleared. Because of the virtual  
hosts in the cache path, this is not the case when using this plugin.  
I just dove into the plugin to see if there is any way to change this,  
but I don’t see any way to get the hostname when editing the page.  
Short of clearing the whole cache, not just the page being editted,  
does anyone have any ideas how you might do thisß

Keith

---

<div class="post-metadata">

**Author:** ![twerth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@twerth](https://www.ruby-forum.com/u/twerth)\
**Post date:** [December 14, 2007, 1:29am UTC](https://www.ruby-forum.com/t/ann-virtual-domain-extension-1-2-2/123064/3 "2007-12-14T01:29:15Z")

</div>

On 12/13/07, Keith B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> does anyone have any ideas how you might do thisß
> 
> Keith

I think all you would need to do is get the slug of the page  
immediately below the homepage (virtual domain page). That should  
match the hostname of the site that the page lives on. Take a look at  
VirtualDomainPage#site\_map.

Feel free to contact me off-list for help with this.
