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(

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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