Name

AcceptRedirect — accept Web server redirects

SYNOPSIS

No | Yes

DESCRIPTION

The directive enables processing of HTTP server redirects, i.e. when handling ErrorDocument for a Web server such as Apache. For instance, if your Apache httpd.conf contains

  ErrorDocument 404 /cgi-bin/ic/standard

then a request for /somedir/index.html that is not found on the Web server would be resent to /cgi-bin/ic/standard/somedir/index.html, and would be indistinguishable from the static Web server-served page.

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive

EXAMPLES

Example: Enabling AcceptRedirect

AcceptRedirect Yes

NOTES

Combined with the RedirectCache directive, you can automatically create missing HTML pages in your web server's static HTML space, so that they are found on next access. Just beware; that turns them into static pages!

Although the idea seems attractive at first sight, caution should be taken not to allow Web server's ErrorDocument redirection to Interchange globally — it would render you subject to a denial-of-service attack at random URLs (i.e. a flood of MS Windows "Code Red" attacks). It is recommended that you enable it only for specific directories, as Apache or another HTTP server would stand much better up to such a "limited-scale" flood.

AVAILABILITY

AcceptRedirect is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 435

['AcceptRedirect',   'yesno',       'No'],

Source: lib/Vend/Config.pm
Line 5434 (context shows lines 5434-5446)

sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
  return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
  return 0;
}
else {
  config_error("Use 'yes' or 'no' for the $var directive\n");
}
}

AUTHORS

Interchange Development Group

SEE ALSO

RedirectCache(7ic)

DocBook! Interchange!