1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-06 14:16:28 +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 ## 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`: 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` |
|:--------------|:-----------| | document root | `/var/www` |
| Apache mod\_alias | `Alias /static /etc/static_content` | |:------------------|:--------------------------------------------|
| ...or symlink | `ln -s /etc/static_content /var/www/static` | | 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: In `/min/config.php` you'll need the following:
``` ```
// map URL path to file path
$min_symlinks = array( $min_symlinks = array(
// URL path => file path
'//static' => '/etc/static_content' '//static' => '/etc/static_content'
); );
``` ```