Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can the URL be edited on the way out?

Status
Not open for further replies.

langbeen

Programmer
Sep 29, 2003
3
GB
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 &quot;def&quot; directory)?

1. Request from client comes in as
[FINE]

2. Rewrite rule helps this find application server by adding a directory &quot;def&quot;:
[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
 
You would be best off then using your inbound rewrite rules as [R] ( redirect ) rather the [PROXY].

That way you redirect your client on the request.

The only way to modify the outbound URL is via an external redirect. You either do it up-front as outlined above or you cache the result and redirect the browser to it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top