Hi all,
I've spent quite some time getting advagg to work, all aggregates were generated just fine, only requests for compressed versions were stuck in a 307 loop that eventually got terminated.
I managed to make it work by inserting
RewriteBase /sites/default/files/advagg_js
and
RewriteBase /sites/default/files/advagg_css
into the .htaccess files in the aggregate directories
This can also be found in this comment.
The RewriteBase statement is nowhere to be found in the code (at least I haven't found it), is there a reason why? Or does my hoster just have a weird Apache config?
Thanks in advance,
Leo
Comment | File | Size | Author |
---|---|---|---|
#6 | advagg-2850865-5-rewritebase-advagg.patch | 12.26 KB | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedI ended up using this logic in .htaccess to send 404's back to the subdir root if Drupal is running in a web subdir.
http://stackoverflow.com/a/8942296/125684 seems to be the case here. So yes the Apache setup is a little odd.
If you remove the RewriteBase and go to the status report page (admin/reports/status) does advagg complain about gzip not working correctly? Wondering if I can detect this and put in an option, similar to #2850290: Support the "Options +SymLinksifOwnerMatch" option for htaccess files
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThis is how core .htaccess handles it
Comment #4
leobossmann CreditAttribution: leobossmann as a volunteer commentedIndeed it does.
That might well be, because the site is not in a subfolder, and RewriteBase is set accordingly in the base .htaccess.
I guess this would be possible, because the status report page puts out an error 307, instead of getting the compressed asset you get a redirect, that could be a clue.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedThis has been committed. Let me know if this works for you.
Comment #8
leobossmann CreditAttribution: leobossmann as a volunteer commentedI just tried the 7.x-2.x HEAD from the repo, it still does not work for me, although I now get HTTP Status 200 with the redirects instead of Status 307.
I guess it really must be my crummy hosting :(
Anyway, thanks for taking the time!
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedDid you set the "AdvAgg RewriteBase Directive in .htaccess files" textfield to the recommended value "/sites/default/files" at the bottom of the obscure options section on admin/config/development/performance/advagg ?
Comment #10
leobossmann CreditAttribution: leobossmann as a volunteer commentedSorry for the delay. Just set the obscure option and it works just fine :)
Thank you!