Apache Technologies 14 Manual do Utilizador Página 48

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 83
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 47
48 Chapter 3 Managing Websites
4 Type the path for the alias or redirect and click OK.
This is the path in the file system or the redirect that gets sent back to the querier.
5 Click Save.
Sample Aliases and Redirects
The examples below show aliases and redirects.
Alias:
pattern: /images
path: /Volumes/Data/imgs
If you have made a file system change but you don’t want to have to change all of
the image URLs in your HTML files, this will translate http://www.example.com/
images/boat.jpg to grab the file from /Volumes/Data/boat.jpg.
Alias match:
pattern: ^/(.*)\.gif
path: /Library/WebServer/Documents/gifs$1.jpg
If you want all gifs to be stored in a particular directory but to be referenced from the
web server root, this will alias http://www.example.com/logo.gif to serve the file
located at /Library/WebServer/Documents/gifs/logo.gif.
Redirect
Pattern: /webstore
Path: https://secure.example.com/webstore
This redirects all queries for webstore to the secure server.
Redirect match:
pattern: (.*)\.jpg
path: http://imageserver.example.com$1.jpg
If you plan to host static content such as images on a new server, this will redirect all
requests for files ending in .jpg to a different server.
Additional information and other examples of aliases and redirects are available at
http://httpd.apache.org/docs/mod/mod_alias.html.
Vista de página 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 82 83

Comentários a estes Manuais

Sem comentários