This config work ok with apache 1.3
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 admin@localhost.com
DocumentRoot /opt/public_html
DirectoryIndex index.shtml
Options Indexes FollowSymLinks +Includes
RewriteEngine on
RewriteRule ^book/index.my.* ssi/test.shtml [L]
AllowOverride None
Order allow,deny
Allow from all
JkMount /book/* balancer
test.shtml contain a simple code
In browser we can see /book/index.my text by the address
localhost.com/book/index.shtml
But with apache 2.2.11 RewriteRule inside Directory section just
ignored, so we give tomcat error page on this address.
I get working rewrite rules under apache 2.2 by this configuraton:
Options Indexes FollowSymLinks +Includes
AllowOverride None
Order allow,deny
Allow from all
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, that placed now in virtualhost context - this rule
working only in that case under apache 2.2 for me.
Where can i read about this stranges requirements?
Anyway history not ended as yet. =))
At present 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?
UPD:
This give me what i want:
Options Indexes FollowSymLinks Includes
RewriteEngine On
RewriteRule ^book/index.my.* ssi/test.shtml [L]
AllowOverride None
Order allow,deny
Allow from all
SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME balancer
SetEnvIf SCRIPT_NAME !"^/book" no-jk
Looks like a cheat, but working =)
So, you comments are welcome.