From dfa4e67b2e08c723cdb2c640c4303a47b0d6e6e2 Mon Sep 17 00:00:00 2001
From: Rich Bowen
Please see the SSI tutorial for a more complete discussion of server-side includes.
+ +When using RewriteRule
in
+.htaccess
files, be aware that the per-directory context
+changes things a bit. In particular, rules are taken to be relative to
+the current directory, rather than being the original requested URI.
+Consider the following examples:
# In httpd.conf +RewriteRule ^/images/(.+)\.jpg /images/$1.png + +# In .htaccess in root dir +RewriteRule ^images/(.+)\.jpg images/$1.png + +# In .htaccess in images/ +RewriteRule ^(.+)\.jpg $1.png+ + +
In a .htaccess
in your document directory, the leading
+slash is removed from the value supplied to RewriteRule
, and in the
+images
subdirectory, /images/
is removed from
+it. Thus, your regular expression needs to omit that portion as
+well.
Consult the mod_rewrite documentation for
+further details on using mod_rewrite
.
When using .htaccess
files, be aware that the per-directory context
+changes things a bit. In particular, rules are taken to be relative to
+the current directory, rather than being the original requested URI.
+Consider the following examples:
In a .htaccess
in your document directory, the leading
+slash is removed from the value supplied to images
subdirectory, /images/
is removed from
+it. Thus, your regular expression needs to omit that portion as
+well.
Consult the mod_rewrite documentation for
+further details on using mod_rewrite
.
Finally, you may wish to use a .htaccess
file to permit
--
2.40.0