{"action":"closed","issue":{"url":"https://api.github.com/repos/chrsmith/minify/issues/96","labels_url":"https://api.github.com/repos/chrsmith/minify/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/minify/issues/96/comments","events_url":"https://api.github.com/repos/chrsmith/minify/issues/96/events","html_url":"https://github.com/chrsmith/minify/issues/96","id":58993717,"number":96,"title":"URI rewriting confused by Userdir setup","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/minify/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/minify/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/minify/labels/Release-2.1.2","name":"Release-2.1.2","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/minify/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T00:19:33Z","updated_at":"2015-02-26T00:19:34Z","closed_at":"2015-02-26T00:19:34Z","body":"```\nMinify version: 2.1.2\nPHP version: 5.1.6\n\nWhat steps will reproduce the problem?\n1. Use minimy in a UserDir directory (on Apache).\n\nExpected output:\nCSS with correctly preserved URL.\n\nActual output:\nCSS with incorrect URLs.\n\nDid any unit tests FAIL?\nNo\n\nPlease provide any additional information below.\n\nIn an (Apache) UserDir setup the filesysten path to the home directory is\ntypically /home/username/public_html and the URL is example.org/~username\nThe server/PHP document root can't be used - I guess that's obvious.\nHowever, setting the document root to /home/username/public_html (in\nconfig.php) works OK, except for the relative URLs inside CSS files - they\nwill be transformed to /file.css instead of /~username/file.css. I don't\nsee that Minify can fix this automatically (by itself), but I suggest\nadding another parameter burl which will be added in front of the path the\nMinify normally calculates (based on the given document root). OK, enough\nwords - and example:\n\nThe CSS file: http://home.himolde.no/~nordhaug/css/layout.css\nThe output from Minify:\nhttp://home.himolde.no/~nordhaug/minify/?f=css/layout.css\nNotice how the path to background image is set to /css/menu_bg.jpg instead\nof /~nordhaug/css/menu_bg.jpg I'm suggesting fixing this by calling:\nhttp://home.himolde.no/~nordhaug/minify/?f=css&burl=/~nordhaug\nI have looked at the Minify source code and I don't think you can achieve\nthis with the current options in the Minify_CSS class. I didn't see a quick\nfix using prepend/rewrite either, but then I don't know Minify well enough.\n\nHave I made myself clear? What do you think?\n\n\n```\n\n-----\nOriginal issue reported on code.google.com by `hansfn@gmail.com` on 5 Mar 2009 at 9:05"}}