We're running a webserver with loads of virtual hosts that communicate with our application server, BroadVision via a plugin and location directive, e.g.:
<VirtualHost *>
DocumentRoot /home/htdocs
ServerName RewriteEngine On
RewriteCond %{REQUEST_URI} !^/abc/.*$ [NC]
RewriteRule ^/ /abc/init.jsp [R]
BroadVision myapp
<Location /abc>
SetHandler bvsm-handler
Order deny,allow
Allow from all
</Location>
</VirtualHost>
There is a rewrite rule applied to inbound requests to help them find the right place on the server, and all server-side processing is handled by BroadVision, with jsps passed back to Apache for delivery to the client.
Given this environment, here's the question:
Is it possible to apply rewrites to OUTBOUND deliveries from Apache? All the mod_rewrite etc. stuff seems to do is apply changes to inbound traffic. Is it (and if so how) possible to achieve step 4 of the following (basic goal is to get rid of the internal "def" directory)?
1. Request from client comes in as
[FINE]
2. Rewrite rule helps this find application server by adding a directory "def":
[FINE]
3. Application server does its thing and passes a rendered page1.jsp back
[FINE]
4. Apache rewrites the *OUTGOING* URL so that in the client's browser the cleaner URL is shown:
Hope this makes some sense and thanks in advance for any ideas.
Andy
<VirtualHost *>
DocumentRoot /home/htdocs
ServerName RewriteEngine On
RewriteCond %{REQUEST_URI} !^/abc/.*$ [NC]
RewriteRule ^/ /abc/init.jsp [R]
BroadVision myapp
<Location /abc>
SetHandler bvsm-handler
Order deny,allow
Allow from all
</Location>
</VirtualHost>
There is a rewrite rule applied to inbound requests to help them find the right place on the server, and all server-side processing is handled by BroadVision, with jsps passed back to Apache for delivery to the client.
Given this environment, here's the question:
Is it possible to apply rewrites to OUTBOUND deliveries from Apache? All the mod_rewrite etc. stuff seems to do is apply changes to inbound traffic. Is it (and if so how) possible to achieve step 4 of the following (basic goal is to get rid of the internal "def" directory)?
1. Request from client comes in as
[FINE]
2. Rewrite rule helps this find application server by adding a directory "def":
[FINE]
3. Application server does its thing and passes a rendered page1.jsp back
[FINE]
4. Apache rewrites the *OUTGOING* URL so that in the client's browser the cleaner URL is shown:
Hope this makes some sense and thanks in advance for any ideas.
Andy