MSM segment added to uri
Hi
I'm setting up a MSM site which resides in a subfolder.
When creating the navigation, the subfolder/site short name is
added to the page_uri, like so:
www.sitename.com/subfolder/page_uri
Is there any way to setup or hack the module to not add the
subfolder/site short name to the uri?
I will be building this using Bibers multi language extension, and
I'm afraid it will cause some serious issues.
Support Staff 2 Posted by Travis Schmeisser on 04 Mar, 2012 10:20 PM
No, if the site lives there, we need it to build the URLs. We use your system paths to build all links. You can use custom markup with Structure Entries to remove it, but I'm not sure how things would play alongside that extension: http://devot-ee.com/add-ons/structure-entries/
Either way, the URLs would exist and need to be in our system, maybe you could remove them with htaccess though? I've never tried it and like I said I'm not familiar with that add-on.
3 Posted by pushloop on 04 Mar, 2012 10:27 PM
Hi
Thanks for the quick reply.
Would the situation be different if the MSM site resided in a sub-domain?
I.e if the site subdomain.sitename1.com was accessed from sitename2.com, would anything extra be needed to be added to the URL?
Sorry for the noob questions btw, it's my first MSM site :)
Support Staff 4 Posted by Travis Schmeisser on 04 Mar, 2012 10:29 PM
Nope, but it would be at the subdomain - with literally build the links off what is in your system settings.
5 Posted by pushloop on 05 Mar, 2012 10:56 AM
Hey
Sorry for being so thick...but I still don't get why the extra site short name segment, needs to be added. I mean, if all MSM sites were to add this extra segment wouldn't that result in some odd looking URL's, and isn't that the whole point of running through a index.php file in your subdirectory or subdomain directory?
"site2.com/index.php/url_title" seems like the the natural way to go. "site2.com/site2_short_name/index.php/url_title" just looks wrong to me.
Support Staff 6 Posted by Travis Schmeisser on 05 Mar, 2012 03:57 PM
Maybe I'm misunderstanding - we don't add a site name in. We use the paths from your system settings to build the links. This means where your site lives at a URL, we use that to build each path.
7 Posted by Erich Quist on 20 Apr, 2012 01:39 PM
I have my Structure tree as follows:
Homepage (/home)
- New Patient (/home/patient/) - Doctors (/home/patient/) - Why Us? (/home/patient/) - Contact Us (/home/patient/) - Blog (/home/patient/)
Currently, structure is adding /home/ to the end of the url, so www.sitename.com/home/patient is the URL to the New Patient page when I'd like www.sitename/com/patient/ to be the URL.
How do I prevent Structure from including the /home/ in the URL?
8 Posted by Erich on 20 Apr, 2012 01:40 PM
Oh, derp. I forgot.
/ instead of /home
Support Staff 9 Posted by Travis Schmeisser on 20 Apr, 2012 02:42 PM
Yep! You also don't need to nest them actually under home - Structure will understand they're still top level if you don't.
10 Posted by Erich Quist on 20 Apr, 2012 02:46 PM
Is it normal to nest secondary pages under the "Homepage", like so: http://erichquist.com/misc/Screen%20Shot%202012-04-20%20at%207.45.2...? It makes sense to me, but I can't seem to get navigation working properly this way using mode='main'.
Support Staff 11 Posted by Travis Schmeisser on 20 Apr, 2012 02:49 PM
No, you don't need to nest them. Mode shave been deprecated for a while, checkout these examples: http://buildwithstructure.com/documentation/navigation_examples/
12 Posted by Erich Quist on 20 Apr, 2012 03:00 PM
Yeah, I've checked out the examples.
It doesn't make sense to me not to nest secondary pages under the homepage since they are, technically, subpages of the homepage. Is there a way to nest them and only list the children of "/"? I was able to list just the children when I had the homepage's Structure Page URL set to "/hoDme", but I can't now that it's "/".
I did some CSS stuff to make it work, but I'm curious.
Support Staff 13 Posted by Travis Schmeisser on 20 Apr, 2012 05:22 PM
Yes, you would use start_from="/" and show_depth="1".