ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM - Viewing the site as you build it without redirecting the url

May 15, 2012 3:05pm

Subscribe [1]
  • #1 / May 15, 2012 3:05pm

    Lester Ng

    7 posts

    I am building another site using the MSM. When I view my index.html template for the new site it just views the default’s site home page.
    The url looks right. It is going to the appropriate template group and folder. All the templates in the new site just view as the index.html of the default site.
    What is the best way to view it without redirecting the url from my clients current hosting service.

  • #2 / May 16, 2012 1:26pm

    Dan Decker

    7338 posts

    Hi Lester Ng,

    Thanks for posting to the forums!

    I’m going to need a bit more to go on here. What version of ExpressionEngine and MSM are you using?

    How is the additional site configured? New domain, sub-domain? Are you working on a live server or in a local environment?

    Are you using .htaccess on either site to remove index.php?

    Can you make sure that your set up looks similar to this:
    /

    /CONFIG//
    $config['cp_url'] = "http://engine.dev/admin.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['allow_extensions'] = "y";
    $config['site_label'] = "Test 23";
    $config['cookie_prefix'] = "";
    $config['multiple_sites_enabled'] = "y";
    
    index.php and admin.php site 1
    NO CHANGES
    
    index.php and admin.php site 2
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';
    $assign_to_config['site_url'] = 'http://msm.dev';
    
    --- admin ---
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';

    I look forward to your reply!

    Cheers,

  • #3 / May 16, 2012 2:03pm

    Lester Ng

    7 posts

    I am running EE 2.5.0 and MSM 2.1.2

    I am on a live server (engine hosting) I created a subdomain using .htaccess and I have removed the index.php from the default site.

    My Config looks similar to yours.

    When I set up my subdomain, I need to point it to a folder within my root directory instead of outside it.
    I just did this and now I can see the templates in the second site from the subdomain’s url. However, the template is not linking to any of the stylesheets or assets unless I use an absolute path. Is there something I need to change in my general config. so I can use relative paths to all the assets.

    Also, how do remove the .index.php from the second site.

  • #4 / May 16, 2012 4:03pm

    Lester Ng

    7 posts

    Figured it out. Needed to move my _assets to the root directory folder for the subdomain.

    Everything is linking, but for some reason the css and js files still need absolute paths using the subdomain, but everything in the main body links fine with just relative paths. Is this the nature of subdomains, or is there anything I can change in my config.php file?

  • #5 / May 21, 2012 4:06pm

    Dan Decker

    7338 posts

    Hi Lester,

    I’m glad you were able to sort out most of your issues.

    Is this the nature of subdomains, or is there anything I can change in my config.php file?

    Be careful with /system/expressionengine/config/config.php - anything you place there will apply to ALL MSM sites - regardless of domains/sub-domains.

    Anything you need site-specific should be placed in the index.php file for that site and use the $assign_to_config variables.

    For your needs, make sure the values are correct in each site’s Admin-> General Configurtation: URL to the root directory of your site - this should be unique to each MSM site

    “URL to your “themes” folder” and “Theme Folder Path” should match what you have in your first site, regardless of MSM

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases