开发者

fixing google minify css url screwup

开发者 https://www.devze.com 2023-03-28 11:35 出处:网络
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...

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

精彩评论

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

关注公众号