--- Webpacus/lib/Webpacus.pm 2006/01/08 13:58:19 358 +++ Webpacus/lib/Webpacus.pm 2006/01/08 14:52:24 359 @@ -60,14 +60,19 @@ my $site_name = shift @{ $c->req->args }; + $c->log->debug("trying site name: $site_name"); + if (my $sites_root = $c->config->{sites_root}) { my $site_path = $c->path_to('root', $sites_root, $site_name); if (-e $site_path) { $c->stash->{site} = $site_name; - if (my $action = shift @{ $c->req->args }) { + if (my $action = join('/', @{ $c->req->args })) { $c->log->debug( "site: $site_name, action: $action" ); - $c->internal_redirect( $action, $c->stash ); + # TODO can I really change base like this? + $c->stash->{base} = "/$site_name/" . $c->stash->{base} + unless ($c->stash->{base} =~ m#^/\Q$site_name\E/#); + $c->internal_redirect( $action, $c->stash, @{ $c->req->args } ); } else { $c->log->debug( "site: $site_name" ); }