1mod_alias(3)               Erlang Module Definition               mod_alias(3)
2
3
4

NAME

6       mod_alias - URL aliasing.
7

DESCRIPTION

9       Erlang  web  server internal API for handling of, for example, interac‐
10       tion data exported by module mod_alias.
11

EXPORTS

13       default_index(ConfigDB, Path) -> NewPath
14
15              Types:
16
17                 ConfigDB = config_db()
18                 Path = NewPath = string()
19
20              If Path is a directory, default_index/2, it starts searching for
21              resources  or  files  that are specified in the config directive
22              DirectoryIndex. If an appropriate resource or file is found,  it
23              is  appended  to  the  end  of  Path  and then returned. Path is
24              returned unaltered if no appropriate file is found or if Path is
25              not  a  directory.  config_db() is the server config file in ETS
26              table format as described in Inets User's Guide.
27
28       path(PathData, ConfigDB, RequestURI) -> Path
29
30              Types:
31
32                 PathData = interaction_data()
33                 ConfigDB = config_db()
34                 RequestURI = Path = string()
35
36              path/3 returns the file Path in the RequestURI (see  RFC  1945).
37              If  the  interaction  data {real_name,{Path,AfterPath}} has been
38              exported by mod_alias, Path is returned. If no interaction  data
39              has  been  exported, ServerRoot is used to generate a file Path.
40              config_db() and  interaction_data()  are  as  defined  in  Inets
41              User's Guide.
42
43       real_name(ConfigDB, RequestURI, Aliases) -> Ret
44
45              Types:
46
47                 ConfigDB = config_db()
48                 RequestURI = string()
49                 Aliases = [{FakeName,RealName}]
50                 Ret = {ShortPath,Path,AfterPath}
51                 ShortPath = Path = AfterPath = string()
52
53              real_name/3  traverses  Aliases,  typically  extracted from Con‐
54              figDB, and matches each FakeName with RequestURI. If a match  is
55              found,  FakeName  is  replaced  with  RealName in the match. The
56              resulting path is split into two parts, ShortPath and AfterPath,
57              as  defined  in  httpd_util:split_path/1. Path is generated from
58              ShortPath, that is, the result from default_index/2 with  Short‐
59              Path  as  an  argument. config_db() is the server config file in
60              ETS table format as described in Inets User's Guide.
61
62       real_script_name(ConfigDB, RequestURI, ScriptAliases) -> Ret
63
64              Types:
65
66                 ConfigDB = config_db()
67                 RequestURI = string()
68                 ScriptAliases = [{FakeName,RealName}]
69                 Ret = {ShortPath,AfterPath} | not_a_script
70                 ShortPath = AfterPath = string()
71
72              real_script_name/3 traverses ScriptAliases, typically  extracted
73              from  ConfigDB,  and matches each FakeName with RequestURI. If a
74              match is found, FakeName is replaced with RealName in the match.
75              If the resulting match is not an executable script, not_a_script
76              is returned. If it is a script, the resulting script path is  in
77              two    parts,   ShortPath   and   AfterPath,   as   defined   in
78              httpd_util:split_script_path/1. config_db() is the server config
79              file in ETS table format as described in Inets User's Guide.
80
81
82
83Ericsson AB                       inets 7.3.2                     mod_alias(3)
Impressum