From: Rich Bowen
Using the [F] flag causes the server to return a 403 Forbidden status
code to the client. While the same behavior can be accomplished using
-the Deny
directive, this
+the Deny
directive, this
allows more flexibility in assigning a Forbidden status.
The following rule will forbid .exe
files from being
@@ -519,7 +519,7 @@ The target (or substitution string) in a RewriteRule is assumed to be a
file path, by default. The use of the [PT] flag causes it to be treated
as a URI instead. That is to say, the
use of the [PT] flag causes the result of the RewriteRule
to be passed back through
-URL mapping, so that location-based mappings, such as Alias
, Redirect
, or ScriptAlias
, for example, might have a
+URL mapping, so that location-based mappings, such as Alias
, Redirect
, or ScriptAlias
, for example, might have a
chance to take effect.
Consider using either ProxyPass
or ProxyPassMatch
whenever possible in
+
Consider using either ProxyPass
or ProxyPassMatch
whenever possible in
preference to mod_rewrite.
This ruleset is designed to use in a per-directory context (In a
<Directory> block or in a .htaccess file), so that the
-f
checks are looking at the correct directory path.
- You may need to set a RewriteBase
directive to specify the
+ You may need to set a RewriteBase
directive to specify the
directory base that you're working in.
The very best way to solve this doesn't involve mod_rewrite at all,
-but rather uses the Redirect
+but rather uses the Redirect
directive placed in a virtual host for the non-canonical
hostname(s).