0 users online. Create an account or sign in to join them.Users

Search

What if you wanted two sites running off the same database, but with different index pages?

For example, I might have a site at www.example.com, but another subdomain for an intranet: team.example.com. The site has been purposely built as a single Symphony install to allow easy integration between the public pages and intranet pages. The home page for the intranet is www.example.com/dashboard/, but only when logged in. Otherwise, the home page is www.example.com/login/.

I suppose one approach would be to modify the .htaccess file so that the index pointed to a different page, depending on the request URL.

What would be the best approach?

Sounds like this could be solved easily with the Ninja Domain technique. :-)

But if your issue boils down to only one page (are you sure it does?), you can make it even simpler. Just check for the $root param in your XSL:

<xsl:choose>
    <xsl:when test="$root='team.example.com'">
        <xsl:value-of select="'do-this!'"/>
    </xsl:when>
    <xsl:otherwise>
        <xsl:value-of select="'do-that!'"/>     
    </xsl:otherwise>
</xsl:choose>

[EDIT]: I hope that I understood your issue correctly.

I should have looked at the Ninja Domain technique, but I guess I had assumed that it was for a different situation. I've always wanted to give this a try, but hadn't come across an opportunity to use it yet. It looks like this is my opportunity. Thanks, Michael. :-)

You never tried it? Unbelievable... Drop me a line if you run into problems!

It is unbelievable, isn't it? I'm embarrassed to say so ;-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details