I Have a MSM site setup, and am also using Structure.
The sub-site domains looks like: mymainsite.com/sub-site
The sub-site homepage loads just fine, but I cannot get to any pages after that - aka mymainsite.com/sub-site/anything gives me a 404.
I set up a template to try and see what's going on, and here's what I've found so far:
- Entries from the Main Site seem to load fine.
- Entries from the Sub Site 404
- The site="" parameter does not seem to work with the structure nav tag.
Here's what I have for testing:
<p>Site: {site_name}</p>
<p>Breadcrumbs: {exp:structure:breadcrumb}</p>
<p>This NAV: {exp:structure:nav site="sub_site"}</p>
<p>Main Site NAV: {exp:structure:nav site="main_site"}</p>
<p>Structure Page URL: {structure:page:url}</p>
<p>Structure Page URI: {structure:page:uri}</p>
<p>Structure Child IDs: {structure:child_ids}</p>
<p>Structure Entry ID: {structure:top:entry_id}</p>
<h2>TEST Entries:</h2><br>
{exp:channel:entries site="sub_site"}
<p>{title} - {page_url} - {entry_id}</p>
<p><a href="{page_uri}">{page_uri}</a></p>
{/exp:channel:entries}
The output I get from http://mymainsite.com:
Site: [Correct Site Name]
Breadcrumbs: [BLANK]
This NAV: [Correct, Nav for Main Site]
Main Site NAV: [Correct]
Structure Page URL: [BLANK]
Structure Page URI: [BLANK]
Structure Child IDs: [BLANK]
Structure Entry ID: [BLANK]
TEST Entries: [BLANK]
The output I get from http://mymainsite.com/sub-site: (404 template)
Site: [Correct Site Name]
Breadcrumbs: Home > Here (home link is correct)
This NAV: [Correct Nav for Sub Site, BUT WRONG URLs, do not have /sub-site segment]
Main Site NAV: [WRONG - shows nav for Sub Site]
Structure Page URL: [Correct]
Structure Page URI: / (should be /sub-site ?)
Structure Child IDs: [BLANK]
Structure Entry ID: [BLANK]
TEST Entries: Homepage (incorrect - url is to the main site's homepage)
The output I get from http://mymainsite.com/page:
Site: [Correct Site Name]
Breadcrumbs: [BLANK]
This NAV: [Correct, Nav for Main Site]
Main Site NAV: [Correct]
Structure Page URL: [correct]
Structure Page URI: [correct]
Structure Child IDs: [BLANK]
Structure Entry ID: [correct]
TEST Entries: [BLANK]
The output I get from http://mymainsite.com/sub-site/page: (404 template)
Site: [WRONG - Main Site Name]
Breadcrumbs: [BLANK]
This NAV: [WRONG - Shows for Main Site]
Main Site NAV: [Correct]
Structure Page URL: [BLANK]
Structure Page URI: [BLANK]
Structure Child IDs: [BLANK]
Structure Entry ID: [BLANK]
TEST Entries: [Correct] - Lists all structure pages that exist under the Sub Site, correct {page_url} & {page_uri}, BUT the links all 404.
So the main issues I'm seeing is that the structure nav tag is not outputting the correct paths for the sub-site URLs as well. They're missing the /sub-site segment.
Any ideas what could possibly be going wrong here, or what I'm missing? I only have an htaccess file set up under the root, which contains:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]
</IfModule>
My directories are as follows:
Root -
- Main Site (is in root)
- images
- skin
- sub-site
- sub-site
- sub-site
System
Thanks for any insight!