I've set up a Resources section on a multi-site installation with the type of Channel. For Site 1 I've set the routing rule to be {resourcesParent.one.slug}/{slug} and for Site 2 I've set the rule as {slug}.

enter image description here

So for Site 1 a resource titled sample-resource would resolve to www.example.com/parent-slug/sample-resource.

And for Site 2 it would resolve as sub.example.com/sample-resource

Everything works fine for Site 1, however when I go to sub.example.com/sample-resource I get a "template not found: sample-resource" 404 error.

Seems like this should work so I'm not sure what I'm doing wrong.

EDIT: I just noticed that sub.example.com/parent-slug/sample-resource is resolving, so I think something's wrong with my config. Here's what I have for my dev environment in craft/config/general.php:

'dev' => [
    'siteUrl' => array(

1 Answer 1


I forgot to add define('CRAFT_SITE', 'sub'); to the index.php file on my Site 2 web root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.