Erlang -- mod_alias

User's Guide
Reference Manual
Release Notes
PDF
Top

inets
Reference Manual
Version 6.3.4

Expand All
Contract All

Table of Contents

- inets
  - Top of manual page
  - service_names/0
  - services/0
  - services_info/0
  - start/0
  - start/2
  - start/3
  - start/1
  - stop/0
  - stop/2
- ftp
  - Top of manual page
  - account/2
  - append/2
  - append/3
  - append_bin/3
  - append_chunk/2
  - append_chunk_end/1
  - append_chunk_start/2
  - cd/2
  - close/1
  - delete/2
  - formaterror/1
  - lcd/2
  - lpwd/1
  - ls/1
  - ls/2
  - mkdir/2
  - nlist/1
  - nlist/2
  - open/1
  - open/2
  - pwd/1
  - quote/2
  - recv/2
  - recv/3
  - recv_bin/2
  - recv_chunk/1
  - recv_chunk_start/2
  - rename/3
  - rmdir/2
  - send/2
  - send/3
  - send_bin/3
  - send_chunk/2
  - send_chunk_end/1
  - send_chunk_start/2
  - type/2
  - user/3
  - user/4
- tftp
  - Top of manual page
  - change_config/2
  - change_config/2
  - change_config/2
  - info/1
  - info/1
  - info/1
  - read_file/3
  - start/1
  - write_file/3
  - Logger:error_msg/2
  - Logger:info_msg/2
  - Logger:warning_msg/2
  - Module:abort/3
  - Module:open/6
  - Module:prepare/6
  - Module:read/1
  - Module:write/2
- httpc
  - Top of manual page
  - cancel_request/1
  - cancel_request/2
  - cookie_header/1
  - cookie_header/3
  - cookie_header/2
  - get_options/1
  - get_options/2
  - info/0
  - info/1
  - request/4
  - request/5
  - request/1
  - request/2
  - reset_cookies/0
  - reset_cookies/1
  - set_options/1
  - set_options/2
  - store_cookies/2
  - store_cookies/3
  - stream_next/1
  - which_cookies/0
  - which_cookies/1
  - which_sessions/0
  - which_sessions/1
- httpd
  - Top of manual page
  - info/2
  - info/3
  - info/4
  - info/3
  - info/1
  - info/2
  - parse_query/1
  - reload_config/2
  - Module:do/1
  - Module:load/2
  - Module:remove/1
  - Module:store/2
- httpd_custom_api
  - Top of manual page
  - request_header/1
  - response_default_headers/0
  - response_header/1
- httpd_socket
  - Top of manual page
  - deliver/3
  - peername/2
  - resolve/0
- httpd_util
  - Top of manual page
  - convert_request_date/1
  - create_etag/1
  - day/1
  - decode_hex/1
  - flatlength/1
  - hexlist_to_integer/1
  - integer_to_hexlist/1
  - lookup/2
  - lookup/3
  - lookup_mime/2
  - lookup_mime/3
  - lookup_mime_default/2
  - lookup_mime_default/3
  - message/3
  - month/1
  - multi_lookup/2
  - reason_phrase/1
  - rfc1123_date/0
  - rfc1123_date/2
  - split/3
  - split_path/1
  - split_script_path/1
  - strip/1
  - suffix/1
- mod_alias
  - Top of manual page
  - default_index/2
  - path/3
  - real_name/3
  - real_script_name/3
- mod_auth
  - Top of manual page
  - add_group_member/5
  - add_group_member/3
  - add_group_member/4
  - add_user/2
  - add_user/6
  - add_user/5
  - delete_group/4
  - delete_group/2
  - delete_group_member/5
  - delete_group_member/3
  - delete_group_member/4
  - delete_user/4
  - delete_user/3
  - delete_user/2
  - get_user/4
  - get_user/3
  - get_user/2
  - list_group_members/4
  - list_group_members/2
  - list_group_members/3
  - list_groups/3
  - list_groups/1
  - list_groups/2
  - list_users/3
  - list_users/1
  - list_users/2
  - update_password/6
  - update_password/5
- mod_esi
  - Top of manual page
  - deliver/2
  - Module:Function/2
  - Module:Function/3
- mod_security
  - Top of manual page
  - block_user/5
  - block_user/4
  - list_auth_users/2
  - list_auth_users/3
  - list_auth_users/1
  - list_auth_users/2
  - list_blocked_users/2
  - list_blocked_users/3
  - list_blocked_users/1
  - list_blocked_users/2
  - unblock_user/3
  - unblock_user/4
  - unblock_user/2
  - unblock_user/3
  - Module:event/5
  - Module:event/4
- http_uri
  - Top of manual page
  - decode/1
  - encode/1
  - parse/1
  - parse/2
  - scheme_defaults/0

# mod_alias

### MODULE

mod_alias

### MODULE SUMMARY

URL aliasing.

### DESCRIPTION

Erlang web server internal API for handling of, for example, interaction data exported by module mod_alias.

### EXPORTS

default_index(ConfigDB, Path) -> NewPath

Types:

ConfigDB = config_db()
Path = NewPath = string()

If Path is a directory, default_index/2, it starts searching for resources or files that are specified in the config directive DirectoryIndex. If an appropriate resource or file is found, it is appended to the end of Path and then returned. Path is returned unaltered if no appropriate file is found or if Path is not a directory. config_db() is the server config file in ETS table format as described in Inets User's Guide.

path(PathData, ConfigDB, RequestURI) -> Path

Types:

PathData = interaction_data()
ConfigDB = config_db()
RequestURI = Path = string()

path/3 returns the file Path in the RequestURI (see RFC 1945). If the interaction data {real_name,{Path,AfterPath}} has been exported by mod_alias, Path is returned. If no interaction data has been exported, ServerRoot is used to generate a file Path. config_db() and interaction_data() are as defined in Inets User's Guide.

real_name(ConfigDB, RequestURI, Aliases) -> Ret

Types:

ConfigDB = config_db()
RequestURI = string()
Aliases = [{FakeName,RealName}]
Ret = {ShortPath,Path,AfterPath}
ShortPath = Path = AfterPath = string()

real_name/3 traverses Aliases, typically extracted from ConfigDB, and matches each FakeName with RequestURI. If a match is found, FakeName is replaced with RealName in the match. The resulting path is split into two parts, ShortPath and AfterPath, as defined in httpd_util:split_path/1. Path is generated from ShortPath, that is, the result from default_index/2 with ShortPath as an argument. config_db() is the server config file in ETS table format as described in Inets User's Guide.

real_script_name(ConfigDB, RequestURI, ScriptAliases) -> Ret

Types:

ConfigDB = config_db()
RequestURI = string()
ScriptAliases = [{FakeName,RealName}]
Ret = {ShortPath,AfterPath} | not_a_script
ShortPath = AfterPath = string()

real_script_name/3 traverses ScriptAliases, typically extracted from ConfigDB, and matches each FakeName with RequestURI. If a match is found, FakeName is replaced with RealName in the match. If the resulting match is not an executable script, not_a_script is returned. If it is a script, the resulting script path is in two parts, ShortPath and AfterPath, as defined in httpd_util:split_script_path/1. config_db() is the server config file in ETS table format as described in Inets User's Guide.