From: Joshua Slive
DocumentRoot
. URLs with a
(%-decoded) path beginning with url-path will be mapped
- to local files beginning with directory-path.
+ to local files beginning with directory-path. The
+ url-path is case-sensitive, even on case-insenitive
+ file systems.
Alias /image /ftp/pub/image
@@ -184,6 +186,14 @@ expressions
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
It is also possible to construct an alias with case-insensitive + matching of the url-path:
+ +
+ AliasMatch (?i)^/image(.*) /ftp/pub/image$1
+
The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.
-The old URL-path is a (%-decoded) path beginning with - a slash. A relative path is not allowed. The new URL - should be an absolute URL beginning with a scheme and hostname, - but a URL-path beginning with a slash may also be used, in which - case the scheme and hostname of the current server will be - added.
+The old URL-path is a case-sensitive (%-decoded) path + beginning with a slash. A relative path is not allowed. The new + URL should be an absolute URL beginning with a scheme and + hostname, but a URL-path beginning with a slash may also be used, + in which case the scheme and hostname of the current server will + be added.
Then any request beginning with URL-Path will return a redirect request to the client at the location of the target @@ -342,9 +352,9 @@ target as a CGI script
The ScriptAlias
directive has the same
behavior as the Alias
directive, except that in addition it marks the target directory
- as containing CGI scripts that will be processed by mod_cgi
's cgi-script handler. URLs with a
+ as containing CGI scripts that will be processed by mod_cgi
's cgi-script handler. URLs with a case-sensitive
(%-decoded) path beginning with URL-path will be mapped
- to scripts beginning with the second argument which is a full
+ to scripts beginning with the second argument, which is a full
pathname in the local filesystem.
@@ -352,8 +362,34 @@ target as a CGI script
A request for http://myserver/cgi-bin/foo
would cause the
- server to run the script /web/cgi-bin/foo
.
/web/cgi-bin/foo
. This configuration
+ is essentially equivalent to:
+
+ Alias /cgi-bin/ /web/cgi-bin/
+ <Directory /web/cgi-bin >
+
+ SetHandler cgi-script
+ Options +ExecCGI
+
+ </Directory>
+
DocumentRoot
in order to
+ avoid accidentally revealing their source code if the
+ configuration is ever changed. The
+ ScriptAlias
makes this easy by mapping a
+ URL and designating CGI scripts at the same time. If you do
+ choose to place your CGI scripts in a directory already
+ accessible from the web, do not use
+ ScriptAlias
. Instead, use <Directory>
, SetHandler
, and Options
as shown in the second example
+ above.It is also possible to construct an alias with case-insensitive + matching of the url-path:
+ +The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.
-The old URL-path is a (%-decoded) path beginning with - a slash. A relative path is not allowed. The new URL - should be an absolute URL beginning with a scheme and hostname, - but a URL-path beginning with a slash may also be used, in which - case the scheme and hostname of the current server will be - added.
+The old URL-path is a case-sensitive (%-decoded) path + beginning with a slash. A relative path is not allowed. The new + URL should be an absolute URL beginning with a scheme and + hostname, but a URL-path beginning with a slash may also be used, + in which case the scheme and hostname of the current server will + be added.
Then any request beginning with URL-Path will return a
redirect request to the client at the location of the target
@@ -337,9 +347,9 @@ target as a CGI script
behavior as the
A request for http://myserver/cgi-bin/foo
would cause the
- server to run the script /web/cgi-bin/foo
.
/web/cgi-bin/foo
. This configuration
+ is essentially equivalent to:
+