httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Channel <>
Subject [users@httpd] RewriteRule under JkMount location and server variables
Date Fri, 01 May 2009 11:15:34 GMT
This config work ok with apache 1.3
<VirtualHost *:8289>

    RewriteEngine on
    RewriteLog "/opt/logs/httpd_rewrite_log"
    RewriteLogLevel 2

    AddType application/octet-stream .mht
    AddType text/html .shtml
    AddType application/ .xls
    AddHandler server-parsed .shtml
    AddDefaultCharset WINDOWS-1251

    DocumentRoot /opt/public_html
    DirectoryIndex index.shtml

    <Directory "/opt/public_html">
        Options Indexes FollowSymLinks +Includes
        RewriteEngine on
        RewriteRule ^book/* ssi/test.shtml [L]
        AllowOverride None
        Order allow,deny
        Allow from all
    JkMount /book/* balancer


In test.shtml placed simple code <!--#echo var='REDIRECT_URL' -->
In browser we can see /book/ text on the page

But with apache 2.2.11 RewriteRule inside Directory section just
ignored, so we give tomcat error page on address

I get rewrite rules work under apache 2.2 by this configuraton:

    <Directory "/opt/public_html">
        Options Indexes FollowSymLinks +Includes
        AllowOverride None
        Order allow,deny
        Allow from all
    RewriteRule ^/book/* /ssi/test.shtml [L,PT]
    JkMount /book/* balancer

Draw attention to first slash at ^/book and /ssi and flag PT in
RewriteRule placed now in virtualhost context - i can get this rule
works only with this conditions under apache 2.2.
On page i see text (none).
The variable REDIRECT_URL is very useful for my website and im sad
without her. Any ideas?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message