This is declared as follows:</p>
<pre class="prettyprint lang-c">
- APR_HOOK_STRUCT(
- APR_HOOK_LINK(do_something)
- ...
- )
+APR_HOOK_STRUCT(
+ APR_HOOK_LINK(do_something)
+ ...
+)
</pre>
something like this:</p>
<pre class="prettyprint lang-c">
- void ap_run_do_something(request_rec *r, int n)
- {
- ...
- do_something(r, n);
- }
+void ap_run_do_something(request_rec *r, int n)
+{
+...
+do_something(r, n);
+}
</pre>
like so:</p>
<pre class="prettyprint lang-c">
- int n, ret;
- request_rec *r;
+int n, ret;
+request_rec *r;
- ret=ap_run_do_something(r, n);
+ret=ap_run_do_something(r, n);
</pre>
of the correct type:</p>
<pre class="prettyprint lang-c">
- static int my_something_doer(request_rec *r, int n)<br />
- {
- ...
- return OK;
- }
+static int my_something_doer(request_rec *r, int n)<br />
+{
+ ...
+ return OK;
+}
</pre>
structure:</p>
<pre class="prettyprint lang-c">
- static void my_register_hooks()
- {
- ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
- }
-
- mode MODULE_VAR_EXPORT my_module =
- {
- ...
- my_register_hooks /* register hooks */
- };
+static void my_register_hooks()
+{
+ ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
+}
+
+mode MODULE_VAR_EXPORT my_module =
+{
+ ...
+ my_register_hooks /* register hooks */
+};
</pre>
before we do, then we'd hook as follows:</p>
<pre class="prettyprint lang-c">
- static void register_hooks()
- {
- static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
+static void register_hooks()
+{
+ static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
- ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
- }
+ ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
+}
</pre>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
</table>
<p>The <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive
- specifies the URL to redirect to should the user not be authorised to view a page. By default,
- if a user is not authorised to view a page, the HTTP response code <code>HTTP_UNAUTHORIZED</code>
- will be returned with the page specified by the
+ specifies the URL to redirect to should the user not be authorised to view a page. The value
+ is parsed using the <a href="../expr.html">ap_expr</a> syntax before being sent to the client.
+ By default, if a user is not authorised to view a page, the HTTP response code
+ <code>HTTP_UNAUTHORIZED</code> will be returned with the page specified by the
<code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code> directive. This directive overrides this
default.</p>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
</table>
<p>The <code class="directive"><a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></code> directive
- specifies the URL to redirect to should the user have logged in successfully. This directive
- can be overridden if a form field has been defined containing another URL using the
- <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive.</p>
+ specifies the URL to redirect to should the user have logged in successfully. The value is
+ parsed using the <a href="../expr.html">ap_expr</a> syntax before being sent to the client.
+ This directive can be overridden if a form field has been defined containing another URL
+ using the <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive.</p>
<p>Use this directive if you have a dedicated login URL, and you have not embedded the
destination page in the login form.</p>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
</table>
<p>The <code class="directive"><a href="#authformlogoutlocation">AuthFormLogoutLocation</a></code> directive
- specifies the URL of a page on the server to redirect to should the user attempt to log out.</p>
+ specifies the URL of a page on the server to redirect to should the user attempt to log
+ out. The value is parsed using the <a href="../expr.html">ap_expr</a> syntax before
+ being sent to the client.</p>
<p>When a URI is accessed that is served by the handler <code>form-logout-handler</code>,
the page specified by this directive will be shown to the end user. For example:</p>