URI rewrite IIS and virtual directories
Closed this issue · 4 comments
GoogleCodeExporter commented
STOP! If your issue is with URI rewriting, read the wiki first:
http://code.google.com/p/minify/wiki/CommonProblems#URIs_are_re-
written_incorrectly_in_CSS_output
Please remove this message from the issue.
I read the wiki and I believe I need to set the min_symblink array with
pathes because of the directory structure. I just need some guidance on
that. These are be located on a windows box running IIS. On my local I am
using Xampp and it seem to be adjusting the path
my Min directory is
D:\Dev\i3webdesktop_dev\system\globals\min
my Images Directory is
D:\Dev\i3webdesktop_dev\resources\images
my CSS directory is
D:\Dev\i3webdesktop_dev\resources\css
Minify version: 2.1.3
PHP version: 5.1.3
What steps will reproduce the problem?
I Seem to be having issues URI output on IIS and seems work correctly
I believe IIS server may be using virtual directory.
Expected output:
Actual output:
/* Minify_CSS_UriRewriter::$debugText for IIS
docRoot : D:\Dev\i3webdesktop_dev\system\globals
currentDir : D:\Dev\i3webdesktop_dev\resources\css
file-relative URI : ../images/default/box/tb-blue.gif
path prepended :
D:\Dev\i3webdesktop_dev\resources\css\..\images\default\box\tb-blue.gif
docroot stripped : ..\images\default\box\tb-blue.gif
traversals removed : ../images/default/box/tb-blue.gif
/* Minify_CSS_UriRewriter::$debugText for Apache
docRoot : C:\Program Files\xampp\htdocs
currentDir : C:\Program Files\xampp\htdocs\workspace\i3logix\resources\css
file-relative URI : ../images/default/box/tb-blue.gif
path prepended : C:\Program
Files\xampp\htdocs\workspace\i3logix\resources\css\..\images\default\box\tb-blue
.gif
docroot stripped :
\workspace\i3logix\resources\css\..\images\default\box\tb-blue.gif
traversals removed :
/workspace/i3logix/resources/images/default/box/tb-blue.gif
I would assume the pathes should be adjusted relative to the min director
they don't appear to change when its loaded on the IIS server. I ran the
unit test in the document root but I have not had a chance to run the then
under the /system/globals/min
Did any unit tests FAIL? (Please do not post the full list)
Please provide any additional information below. If this has to do with URI
rewriting, please include your DOCUMENT_ROOT, the
Original issue reported on code.google.com by rmccl...@gmail.com
on 1 Nov 2009 at 9:24
Attachments:
GoogleCodeExporter commented
You'll need to tell Minify how those virtual directories (which are outside of
your
docroot) map back into the docroot (as seen by the client). Assuming your CSS
files
are at example.com/css/, you'll do this in config.php:
$min_symlinks = array(
'//css' => 'D:\\Dev\\i3webdesktop_dev\\resources\\css'
,'//images' => 'D:\\Dev\\i3webdesktop_dev\\resources\\images'
);
With this, the rewriting process will add the essential step ("symlink
unresolved")
to map the virtual folders back to the docroot:
file-relative URI : ../images/default/box/tb-blue.gif
path prepended :
D:\Dev\i3webdesktop_dev\resources\css\..\images\default\box\tb-
blue.gif
symlink unresolved :
D:\Dev\i3webdesktop_dev\system\globals\css\..\images\default\box
\tb-blue.gif
docroot stripped : \css\..\images\default\box\tb-blue.gif
traversals removed : /images/default/box/tb-blue.gif
Original comment by mrclay....@gmail.com
on 3 Nov 2009 at 2:10
- Changed state: NeedInfo
GoogleCodeExporter commented
$min_symlinks doesn't work with virtual addresses => http://www.....
Original comment by ramo...@gmail.com
on 27 Nov 2009 at 9:25
GoogleCodeExporter commented
@ramonck: Minify can only rewrite paths on same system. I've added a wiki entry
for
UriRewriting for example usage.
Original comment by mrclay....@gmail.com
on 28 Nov 2009 at 2:51
GoogleCodeExporter commented
Closing. User should be able to get this working via wiki docs/support list.
Original comment by mrclay....@gmail.com
on 23 Apr 2010 at 3:01
- Changed state: Invalid