[thelist] Apache and RewriteMap
Tony Brandner
tony at serebra.com
Thu Nov 24 16:37:24 CST 2005
Nevermind, got it.
Needed to add the directive "RewriteOptions inherit" inside the virtual
host.
Thanks all!
Tony
How's that for a tip... might as well put it in there:
<tip type="Apache, mod_rewrite, rewritemap">
When using mod_rewrite with maps and virtual hosts, be sure to use the
directive:
RewriteOptions inherit
This causes the Rewrite rules in the virtual host context to inherit the map
settings and other rewrite rules from the general server config.
</tip>
-----Original Message-----
Subject: Apache and RewriteMap
# in httpd.conf at config level
RewriteEngine on
RewriteMap sessionmap txt:/var/www/sessionmap.txt
# in httpd.conf at virtualhost level
RewriteEngine on
RewriteRule ^/ss/123456789/?(.*) /path/to/course/$1
RewriteRule ^/ss/([^/]*)/?(.*) ${sessionmap:$1|/test/}/$2
RewriteLog "/var/log/httpd/web_rewrite_log"
RewriteLogLevel 1
Thanks,
Tony Brandner
Serebra Learning Corporation
www.serebra.com, www.easylearning.org
More information about the thelist
mailing list