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.

.htaccess http://www.site.com - http://site.com problem

February 15, 2010 2:12am

Subscribe [1]
  • #1 / Feb 15, 2010 2:12am

    B-n-H

    11 posts

    for some reason, when I goto http://site.com/c/style.css it displays my main template but without a style becuase my index.php replaces the CSS in the /c/style.css file for some reason.. so when i type it in directly, i see my template. When i visit the same exact page but add the www (http://www.site.com/c/style.css) it displays the css file fine! no problems at all..

    How can i fix this so i can use http://site.com/c/style.css?


    ETA .htaccess:

    # -- LG .htaccess Generator Start --
    
    # .htaccess generated by LG .htaccess Generator v1.0.0
    # <a href="http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/">http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/</a>
    
    # secure .htaccess file
    <Files .htaccess>
     order allow,deny
     deny from all
    </Files>
    
    # Dont list files in index pages
    IndexIgnore *
    
    # EE 404 page for missing pages
    ErrorDocument 404 /index.php?/
    
    # Simple 404 for missing files
    <FilesMatch "(\.jpe?g|gif|png|bmp)$">
      ErrorDocument 404 "File Not Found"
    </FilesMatch>
    
    RewriteEngine On
    
    RewriteBase /
    
    # remove the www
    RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
    RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # Add a trailing slash to paths without an extension
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]
    
    # Remove index.php
    # Uses the "include method"
    # <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method">http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method</a>
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} ^/(site|search|global||members|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    # Remove IE image toolbar
    <FilesMatch "\.(html|htm|php)$">
      Header set imagetoolbar "no"
    </FilesMatch>
    
    # -- LG .htaccess Generator End --
  • #2 / Feb 15, 2010 5:43am

    B-n-H

    11 posts

    i got everything to work by forcing www but i would rather remove the subdomain.. does any1 know how i can fix this?

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

ExpressionEngine News!

#eecms, #events, #releases