[pmwiki-users] Ben : question about WikiFarmAlternative

Ben Wilson dausha at gmail.com
Mon Aug 28 10:36:34 CDT 2006

On 8/28/06, Jean-Fabrice [gmail] <jeanfabrice at gmail.com> wrote:
> Ben,
> I'm reading with attention your recipe, and I'm stuck on the
> rewrite_rule you mention in order to relocate /pub out of the web tree
> :
> RewriteRule ^/pub/?(.*) {core_directory}/pmwiki-share/pub/$1 [L,qsa]
> I was wondering how can it works since
> {core_directory}/pmwiki-share/pub/$1 is a system path, not an url.

Once you get to the rewrite rules, the destination does not need to be
a valid URL. This is a common tactic employed by web servers to allow
user's to have a web directory within their home directory rather than
in /var.[1] I've had an odd problem where this redirect does not work
on the root web directory (http://www.example.org/) but it does work
with any farm directory (http://www.example.org/farm). I thought it
was a side effect of my web server.

> What I did it is put the following entry in the apache conf file of the farm :
> AliasMatch ^/pub/?(.*) {core_directory}/pmwiki-share/pub/$1
> ...but I don't see the real difference with having /pub located under
> the farm web root ({core_directory}/pmwiki-latest) and $FarmPubDirUrl
> correctly defined.
> Is there anything I did wrong ?

I may not have explained myself well enough in the recipe. The /pub
directory is in {core_directory}/pmwiki-share, and $FarmD is in
{core_directory}/pmwiki-latest. The web directory is
{core_directory}/www. So, $FarmD is _outside_ the web directory. So,
even if $FarmPubDirUrl points "/pub". It would not point to

I moved /pub out of pmwiki-latest and into pmwiki-share. I don't use
the pmwiki skin, so not having an updated version of that skin does
not affect me.

I was not able to use AliasMatch, because my web server prevents me.

It is also worth mentioning that the way I originally handled the /pub
was to symlink to it, and then set $FarmPubDirUrl to '/pub'; No need
to use .htaccess. If that works for you, then you can save yourself
some heartache.

Ben Wilson
"All this worldly wisdom was once the unamiable heresy of some wise man." HDT

[1]: Granted, resellers tend to chroot users into a home directory
which itself is within /var of the server. This is not what I'm
referring to. I'm referring to /home/user being accessible via

More information about the pmwiki-users mailing list