[HCoop-Help] pmwiki pretty urls [newbie]

Adam Chlipala adam at chlipala.net
Mon Jun 14 10:31:33 EDT 2010

seanmcl at hcoop.net wrote:
> Here's my current domtool file that gives the error.
> [...]
>    web "cmu" where
>      DocumentRoot = home "public_html/cmu";
>    with
>      rewriteBase "/";
>      rewriteRule "^$" "wiki/pmwiki.php" [redirectWith permanent];
>      rewriteRule "^index\.php$" "wiki/pmwiki.php" [redirectWith permanent];
>      rewriteRule "^([A-Z0-9\xa0-\xff].+)$" "wiki/pmwiki.php?n=$1"
> [redirectWith permanent];
>    end;
> [...]
> seanmcl at mire:~/.domtool$ domtool seanmcl.com
> seanmcl.com:7.3-14.6:error: Context incompatibility for nested action.
> Have: Vhost
> Need: Location&  ^Vhost

This problem is no different from what you would encounter with Apache, 
editing the main configuration files instead of using .htaccess.  I 
think the error message is even pretty good, if you understand the 
Domtool type system. :)

For whatever reason, Apache allows RewriteRule to appear at the top 
level of a <vhost> block, while RewriteBase must be inside <location> or 
<directory>.  Domtool is enforcing the same constraint.  Most likely a 
'location "/"' block is called for.

More information about the HCoop-Help mailing list