Specifications
For example, you could set up a redirect so that if the user enters a URL such as
www.example.com/images/boats.jpg and the site has an images folder containing the
boats.jpg le, the browser gets redirected to www.apple.com.
By default, the Sites Aliases panel lists the following redirects:
/collaboration — used to provide the CSS required by Apple’s wiki and blog pages Â
and default index.html and Spotlight displays
/icons/ — used to direct browsers to the standard collection of icons shipped Â
with Apache
/error/ — used to direct browsers to the standard collection of error pages shipped Â
with Apache
The examples below show aliases and redirects.
Type Pattern Path Description
Alias /images /Volumes/Data/imgs If you make a le
system change but
don’t want to update
image URLs in your
HTML les, this instructs
www.example.com/
images/boat.jpg to take
the le from /Volumes/
Data/imgs/boat.jpg.
Alias Match ^/(.*)\.gif /Library/WebServer/
Documents/gifs$1.jpg
If you store gif les in a
specic folder but they
must be referenced
from the web server
root, this instructs the
alias www.example.
com/logo.gif to serve
the le located at
/Library/WebServer/
Documents/gifs/logo.
gif.
Redirect /webstore https://secure.example.
com/webstore
This redirects queries
for a webstore to the
secure server.
Redirect Match (.*)\.jpg http://imageserver.
example.com$1.jpg
If you host static
content such as images
on a new server, this
redirects requests for
les ending in .jpg to a
dierent server.
Further information and other examples of aliases and redirects are available at
http://httpd.apache.org/docs/mod/mod_alias.html.
44 Chapter 3 Creating and Managing Websites