Hi

I have today try with the last dev to have the htacess file in the folder...server was still very slow and i was not able to access the advagg_js/js_c4be3001e38457fb65b303e4d168488a_0.js dont know why to the .css files i have access.
i pull now the rules in the root htaccess and i have access to the files .js and .css server now fast again

Mike please look over is that right ?

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  <IfModule mod_headers.c>
    # Serve gzip compressed CSS/JS files if they exist and client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_URI} (^/(.+)/advagg_(j|cs)s/(.+)\.(j|cs)s) [NC]
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.(j|cs)s$ $1\.$2s\.gz [QSA]

    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "\.(j|cs)s\.gz$">
      # Serve correct encoding type.
      Header append Content-Encoding gzip
      # Force proxies to cache gzipped & non-gzipped css/js files separately.
      Header append Vary Accept-Encoding
    </FilesMatch>
  </IfModule>
<FilesMatch "^(j|cs)s_[0-9a-f]{32}_.+\.(j|cs)s.*">
  FileETag None
  <IfModule mod_expires.c>
    # Enable expirations.
    ExpiresActive On

    # Cache all aggregated CSS/JS files for 1 year after access (A).
    ExpiresDefault A31556926
  </IfModule>
  <IfModule mod_headers.c>
    # Unset unnecessary headers.
    Header unset ETag
    Header unset Last-Modified
    Header unset Pragma

    # Make these files publicly cacheable.
    Header append Cache-Control "public"
  </IfModule>
</FilesMatch>
</IfModule>

Thanks

Comments

mikeytown2’s picture

JS & CSS Compress is very slow; that might have something to do with it. This is how the rules should look.

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

  <IfModule mod_headers.c>
    # Serve gzip compressed CSS/JS files if they exist and client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_URI} (^/(.+)/advagg_(j|cs)s/(.+)\.(j|cs)s) [NC]
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.(j|cs)s$ $1\.$2s\.gz [QSA]

    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "\.(j|cs)s\.gz$">
      # Serve correct encoding type.
      Header append Content-Encoding gzip
      # Force proxies to cache gzipped & non-gzipped css/js files separately.
      Header append Vary Accept-Encoding
    </FilesMatch>
  </IfModule>
</IfModule>

<FilesMatch "^(j|cs)s_[0-9a-f]{32}_.+\.(j|cs)s.*">
  FileETag None
  <IfModule mod_expires.c>
    # Enable expirations.
    ExpiresActive On

    # Cache all aggregated CSS/JS files for 1 year after access (A).
    ExpiresDefault A31556926
  </IfModule>
  <IfModule mod_headers.c>
    # Unset unnecessary headers.
    Header unset ETag
    Header unset Last-Modified
    Header unset Pragma

    # Make these files publicly cacheable.
    Header append Cache-Control "public"
  </IfModule>
</FilesMatch>
mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)

Going to take a guess that this issue fixed this one #1098830: ui.datepicker.js cause 500 (internal server error) verified.

eule’s picture

hi mike
i dont see any errors for me but i dont have installed the datepicker

mikeytown2’s picture

This patch will skip files if they end in .jsmin.js, .min.js, .pack.js, .packed.js

http://drupal.org/node/1098830#comment-4236496

eule’s picture

it is not better to let the user a option? i mean a blacklist who anyone can paste a script himself?

mikeytown2’s picture

Those javascript files are already compressed; compressing it again causes jsmin+ to blow up.

mikeytown2’s picture

Still having issues?

eule’s picture

i dont

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)