Sub-domains with EE

Rick has given instruction on exactly how to set up multiple subdomains (or domains for that matter) to point to other templates in your EE installation. Here’s the summary:

This feature now works. We haven’t documented it yet but will soon. In the mean time here is how you do it:

First, you need to replace your index.php file with a copy from the latest build. Replace the one at your site root, not the one you access your CP with.

In order to have a weblog accessible from its own subdirectory you must:

- Put a copy of index.php and path.php in each subdirectory.

- The path.php file in each folder must be opened and you must make sure that it contains the correct path to your backend files.

In addition, you must add the following variables to your path.php file:

$template_group = “name”;

$template = “index”;

$site_url = “http://yoursite.dom/subdomain/”;

$site_index = “index.php”

Notes: The $template_group and $template variables allow you to specify what gets shown by default in that particular directory. Normally you specify the default template in your control panel. This allows you to override it manually, and specify which template gets shown.

The $site_url variable must contain the URL to the particular folder that the path.php file is located in. This is so that links will all work correctly. Again, this manually overrides the CP preferences.

The $site_index variable should indicate the name of the index page in the directory. Usually this will be “index.php”

Read the full forum post here.

How does this post make you feel?
  • Excited
  • Fascinated
  • Amused
  • Bored
  • Sad
  • Angry
This entry was posted in Uncategorized by Yoshi. Bookmark the permalink.

Comments are closed.