1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-06 06:07:24 +02:00

Update UriRewriting.wiki.md

This commit is contained in:
Steve Clay
2015-09-26 16:03:05 -04:00
parent d71b11ec98
commit 5b6b891cc3

View File

@@ -38,15 +38,16 @@ Out-of-the-box, Minify gets confused when `min` is placed in a subdirectory of t
## Aliases / Symlinks / Virtual Directories
Whether you use [aliases](http://httpd.apache.org/docs/2.2/mod/mod_alias.html), [symlinks](http://en.wikipedia.org/wiki/Symbolic_link), or [virtual directories](http://msdn.microsoft.com/en-us/library/zwk103ab.aspx), if you make content outside of the DOC\_ROOT available at public URLs, Minify may need manual configuration of the `$min_symlinks` option to rewrite some URIs correctly. Consider this scenario, where `http://example.org/static/style.css` will serve `/etc/static_content/style.css`:
| document root | `/var/www` |
|:--------------|:-----------|
| Apache mod\_alias | `Alias /static /etc/static_content` |
| ...or symlink | `ln -s /etc/static_content /var/www/static` |
| document root | `/var/www` |
|:------------------|:--------------------------------------------|
| Apache mod\_alias | `Alias /static /etc/static_content` |
| ...or symlink | `ln -s /etc/static_content /var/www/static` |
In `/min/config.php` you'll need the following:
```
// map URL path to file path
$min_symlinks = array(
// URL path => file path
'//static' => '/etc/static_content'
);
```
@@ -65,4 +66,4 @@ $min_serveOptions['minApp']['allowDirs'] = array(
1. Make sure you have the [latest version](http://code.google.com/p/minify/downloads/list).
1. Enable [debug mode](Debugging.md), which will show you the URI transformation process.
1. Check that `$_SERVER['DOCUMENT_ROOT']` is a real directory path. If not, URI rewriting will fail. If you cannot fix this in httpd.conf, etc., use the [configuration option](http://code.google.com/p/minify/source/browse/min/config.php?r=292#47).
1. Paste your [debug mode](Debugging.md) comment block into a new post on the [minify mailing list](http://groups.google.com/group/minify).
1. Paste your [debug mode](Debugging.md) comment block into a new post on the [minify mailing list](http://groups.google.com/group/minify).