Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedJS & CSS Compress is very slow; that might have something to do with it. This is how the rules should look.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to take a guess that this issue fixed this one #1098830: ui.datepicker.js cause 500 (internal server error) verified.
Comment #3
eule CreditAttribution: eule commentedhi mike
i dont see any errors for me but i dont have installed the datepicker
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedhttp://drupal.org/node/1098830#comment-4236496
Comment #5
eule CreditAttribution: eule commentedit is not better to let the user a option? i mean a blacklist who anyone can paste a script himself?
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedThose javascript files are already compressed; compressing it again causes jsmin+ to blow up.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedStill having issues?
Comment #8
eule CreditAttribution: eule commentedi dont
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commented