This config work ok with apache 1.3
<VirtualHost *:8289>
    ServerName www.localhost.com

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

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

    ServerAdmin ad...@localhost.com
    DocumentRoot /opt/public_html
    DirectoryIndex index.shtml

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

</VirtualHost>

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

But with apache 2.2.11 RewriteRule inside Directory section just
ignored, so we give tomcat error page on address
localhost.com/book/index.shtml.

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
    </Directory>
    RewriteRule ^/book/index.my.* /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.
BUT!
On page localhost.com/book/index.shtml 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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to