#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0

    Htaccess Includes not picking up css files


    Just started learning the usage of .htaccess but it's not working the way it's expected.

    First, I made sure htaccess works on my server.

    I have my css files in a css folder.

    From what I found online I put the following together:

    .htaccess
    <FilesMatch "\.combined\.(css)$">
    Options +Includes
    SetOutputFilter INCLUDES
    </FilesMatch>

    styles.combined.css
    <!--#include file="css/main.css"-->
    <!--#include file="css/etsCustom.css"-->
    <!--#include file="css/prettyPhoto.css"-->
    <!--#include file="css/slideshow.css"-->


    I have also tried:
    <!--#include file="main.css"-->
    <!--#include file="etsCustom.css"-->
    <!--#include file="prettyPhoto.css"-->
    <!--#include file="slideshow.css"-->

    Thanks to everyone that helps
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4303
    Try using "include virtual" instead of "include file":
    Code:
    <!--#include virtual="main.css"-->
    <!--#include virtual="etsCustom.css"-->
    <!--#include virtual="prettyPhoto.css"-->
    <!--#include virtual="slideshow.css"-->
    If that doesn't work, I recommend you try using PHP includes instead.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0
    Originally Posted by Kravvitz
    Try using "include virtual" instead of "include file":
    Code:
    <!--#include virtual="main.css"-->
    <!--#include virtual="etsCustom.css"-->
    <!--#include virtual="prettyPhoto.css"-->
    <!--#include virtual="slideshow.css"-->
    If that doesn't work, I recommend you try using PHP includes instead.
    Thank you. I got sidetracked so I'll get back to this in a few days and let you know. I'm sure you're right though.

IMN logo majestic logo threadwatch logo seochat tools logo