This actually applies to both CSS and JS aggregation. The .htaccess file included by default doesn't provide support for sites that require the RewriteBase directive be provided. In my case, it's because I'm using the VirtualDocumentRoot directive. More info: http://drupal.org/node/118569

I have worked around this by modifying the .htaccess files directly and adding the following right below RewriteEngine On (for the css directory, js is similar):

RewriteBase /sites/default/files/advagg_css

Lastly, thanks for a really very nice module - it's the best CSS/JS aggregator module I've used thusfar.

Thanks again!
Patrick

CommentFileSizeAuthor
#3 advagg-1166380-3.patch539 bytesmikeytown2

Comments

mikeytown2’s picture

Version: 6.x-1.0-rc4 » 6.x-1.x-dev
Component: CSS Compression » Code

So inside the generated htaccess files add in

RewriteBase /sites/default/files/advagg_css

I'll need to test this out and see if this interferes with sites not using the RewriteBase directive in the drupal root htaccess file. If this does interfere, then I will need to read the drupal root htaccess file to see if its using RewriteBase.

Just to double check, your drupal root htaccess files does use the RewriteBase directive correct?

mikeytown2’s picture

awesome... appears to work without an issue on my test site; will need to test sub directory usage next; might be a day or 2 before I can do that.

mikeytown2’s picture

Status: Active » Fixed
StatusFileSize
new539 bytes

The first slash needs to be $base_path. This is the patch that has been committed.

pwilson’s picture

Yup, the main Drupal site uses RewriteBase as well, but it's relative to its path:

 RewriteBase /

I'm wondering if this fix might introduce any issues for some configurations. You've tested it successfully, but I wonder if maybe a feature request should be made to make it an option when regenerating the .htaccess files from the module's admin settings page. Just to be safe and make sure my special use case doesn't end up messing up someone else's special use case. Then again, maybe it's not worth it to try to accommodate every possible configuration. Either way, I'd consider this particular bug closed, and in record time!

Thanks again - really impressed with the turnaround on this,
Patrick

mikeytown2’s picture

I tested this in a normal and sub-directory install. Hopefully its a smooth go for everyone.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.