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 CSS and CE_img troubles

January 22, 2013 4:25am

Subscribe [1]
  • #1 / Jan 22, 2013 4:25am

    Maik Hoogkamer

    36 posts

    Hi there,

    Just about to launch an EE MSM site. Everything went smooth when developing locally, but when I tried to put things online I ran into trouble. The main problems lie withing the loading of CSS files and also with getting CE_img to work.

    The MSM installation has the following file structure:

    Httpdocs (main site)
    - index.php
    - admin.php
    - system
    - themes
    - assets
    -- css
    -- img
    -- js
    - ...
    - site2_nl
    -- index.php
    -- admin.php
    -- assets
    --- css
    --- img
    --- js
    - site3_nl
    -- index.php
    -- admin.php
    -- assets
    --- css
    --- img
    --- js

    The domains all point to the httpdocs root folder. The .htaccess file in there should point to the right folder from where sites get shown accordingly. The .htaccess file has the following content:

    <IfModule mod_rewrite.c>
            RewriteEngine On
      Options +FollowSymlinks
    
            # Removes index.php from ExpressionEngine URLs
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php/$1 [L]
            
            RewriteCond %{HTTP_HOST} site2.nl
      RewriteCond %{REQUEST_URI} !site2_nl/
      RewriteRule ^(.*)$ site2_nl/$1 [L]
    </IfModule>

    So far so good. When I request site2.nl in my browser, the index file of site2 gets loaded. However all but the last CSS file is being included. In my <head> I’m trying to load the following files:

    <link href="/assets/css/bootstrap.css" rel="stylesheet">
    <link href="/assets/css/typography.css" rel="stylesheet">
    <link href="/assets/css/jquery.fancybox.css" rel="stylesheet">
    <link href="/assets/css/default.css" rel="stylesheet">
    <link href="/assets/css/site2_nl.css" rel="stylesheet">

    When I checked site2_nl.css in my source code (or when I try to load the URL individually), the index file gets shown which indicates something is not going right. In Firebug, all but the last CSS file get status “304 Not modified”, site2_nl.css gets “200 OK”.

    What does work is when I change the href to “http://www.site1.nl/site2_nl/assets/css/site2_nl.css”, but that’s not the desired solution.

    I tried changing file names and adding new additional css files, but that did not work and got the same result in all cases. Checked file permissions as well, no result either. The other files that do get loaded do all reside in httpdocs/site2_nl/assets/css/ and not in httpdocs/assets/css. What could be interrupting?

    System is running EE 2.5.3 and MSM 2.1.4.

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

ExpressionEngine News!

#eecms, #events, #releases