1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>Access Control by URL</title>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#000080" alink="#FF0000">
<div align="CENTER">
<img src="images/sub.gif" alt="[APACHE DOCUMENTATION]" />
<h3>Apache HTTP Server</h3>
</div>
<h1 align="CENTER">Access Control by URL</h1>
<h2><a id="location" name="location">The
<code><Location></code> Directive</a></h2>
<a href="mod/directive-dict.html#Syntax"
rel="Help"><strong>Syntax:</strong></a> <Location <em>URL
prefix</em>><br />
<a href="mod/directive-dict.html#Context"
rel="Help"><strong>Context:</strong></a> server config, virtual
host<br />
<a href="mod/directive-dict.html#Status"
rel="Help"><strong>Status:</strong></a> core<br />
<p>The <Location> directive provides for access control
by URL. It is comparable to the <a
href="mod/core.html#directory"><Directory></a> directive,
and should be matched with a </Location> directive.
Directives that apply to the URL given should be listed between
them. <code><Location></code> sections are processed in
the order they appear in the configuration file, after the
<Directory> sections and <code>.htaccess</code> files are
read.</p>
<p>Note that, due to the way HTTP functions, <em>URL
prefix</em> should, save for proxy requests, be of the form
<code>/path/</code>, and should not include the
<code>http://servername</code>. It doesn't necessarily have to
protect a directory (it can be an individual file, or a number
of files), and can include wild-cards. In a wild-card string,
`?' matches any single character, and `*' matches any sequences
of characters.</p>
<p>This functionality is especially useful when combined with
the <code><a
href="mod/mod_mime.html#sethandler">SetHandler</a></code>
directive. For example, to enable status requests, but allow
them only from browsers at foo.com, you might use:</p>
<pre>
<Location /status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from .foo.com
</Location>
</pre>
<hr />
<h3 align="CENTER">Apache HTTP Server</h3>
<a href="./"><img src="images/index.gif" alt="Index" /></a>
</body>
</html>
|