开发者

fixing google minify css url screwup

so I'm using google's minify to minify css:

http://code.google.com/p/minify/

what I notice is that google minify replaces the relative urls for background-images to the docroot... but then since the code is called using docroot/min/f=something, this would break the background images since instead of calling it from docroot/images, the correct thing to do is to call if from ../images

开发者_如何学Cis there a way to configure minify as to fix this?


There is a page about URL Rewriting in the project's wiki — http://code.google.com/p/minify/wiki/UriRewriting

You can disable the magnification at all: $min_serveOptions['rewriteCssUris'] = false;, or, if you want to use this optimization on other links, maybe the section “Document Root Confusion” of this wiki page would be helpful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜