Mapping is the term we use here to define how Apache uses information, mostly in the URL, to process a URL.
There is obvious mappings in Apache such as:
Alias /blah /var/www/MyBlah ScriptAlias /boo /usr/lib/cgi-bin/yah.cgi
The next level of mapping is to add some filters to your output. This is really not mapping in my book, it is filters, but in other ways it is the same thing.
<Location /blah> SetOutputFilter DEFALATE # OR AddOutputFilterByType DEFLATE text/html # OR PerlOutputFilterHandler Zaltana::Style->filter </Location>
The next is to prefix the URL with something you want to do.
/z/image/thumbnail/blah
Note that /blah/ is the original URL.
This is best achieved with Apache Subproc for complete compatibility with other systems in use on Apache.
You may want to use a "postfix" approach.
/blah?image=thumbnail
OR
/blah/z/image/thumbnail
One of the downsides of postfix versions is that they may effect your application. The prefix version above allows your original URL/application to run as if it was an original request.
What about automatic ?
You can do mapping based on other rules.
A "/view/" container is a good way of presenting a set of rules to view another object.
/view/blah/image.gif /view/blah/output.rss /view/blah/calendar.ics
In the above the "/view" can display the Gif, RSS or ICS in the proper HTML format, but you can still go to the original URL "/blah/calendar.ics" to get the original file. This allows the web developer/designer or even the user to get a little more control on the information they need. (of course if you must, you can limit the original content to be only accessible from within Apache).
Magic mapping can happen with other methods too - as filters, by type, by time of day, by user logged in or by any regular expression you can come up with against any of the incoming data - you name it.
You can add a mapping which automatically converts all "ics" files to "HTML" output unless "?raw=true" is specified (thus still allowing raw download). You can even remove raw and only present HTML.
Zaltana Configuration
Zaltana begins to help with the amazing number of choices you have by presenting an example and base set of URLs and mappings that are useful. These can be extended, or even ignored, but it is a good place to start.
XXX link.
