You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mohit Anchlia <mo...@gmail.com> on 2008/07/09 17:51:54 UTC

[users@httpd] Using rewrite to forward the request

We have a web server that redirects traffic to app server using mod_jk load
balancer.

Now I need to do the following:

1. If request comes from URL /AB and content of URL /AB has content in
certain format then forward it to mod_jk otherwise forward it to some other
URL (external system in our case).
2. Make sure that when apache forwards the requests to external URL, session
from client is still active.

My obvious questions are:
1. Can I do the above using rewrite rules?
2. Can I use perl in rewrite rules to parse through the content and somehow
tell apache to re-direct the request? What's the best way to do that? In
terms of performance, efficiency etc.
3. If rewrite forwards the request then does it still maintains the session
from client -> WebServer -> External system?

I need your advise.

Re: [users@httpd] Using rewrite to forward the request

Posted by Bradley Giesbrecht <br...@pixilla.com>.
Holy cow.

Did I do that. I did!

I hit reply with the wrong email select. How embarassing.

//Brad

On Jul 9, 2008, at 9:22 AM, Bradley Giesbrecht wrote:

> Actually this is a good use of Chrome.
>
> Chrome has stock images. Well at least one.
>
> //brad
>
> On Jul 9, 2008, at 8:51 AM, Mohit Anchlia wrote:
>
>> We have a web server that redirects traffic to app server using  
>> mod_jk load balancer.
>>
>> Now I need to do the following:
>>
>> 1. If request comes from URL /AB and content of URL /AB has content  
>> in certain format then forward it to mod_jk otherwise forward it to  
>> some other URL (external system in our case).
>> 2. Make sure that when apache forwards the requests to external  
>> URL, session from client is still active.
>>
>> My obvious questions are:
>> 1. Can I do the above using rewrite rules?
>> 2. Can I use perl in rewrite rules to parse through the content and  
>> somehow tell apache to re-direct the request? What's the best way  
>> to do that? In terms of performance, efficiency etc.
>> 3. If rewrite forwards the request then does it still maintains the  
>> session from client -> WebServer -> External system?
>>
>> I need your advise.
>>
>
>
> ---------------------------------------------------------------------
> 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-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Using rewrite to forward the request

Posted by Bradley Giesbrecht <br...@pixilla.com>.
Actually this is a good use of Chrome.

Chrome has stock images. Well at least one.

//brad

On Jul 9, 2008, at 8:51 AM, Mohit Anchlia wrote:

> We have a web server that redirects traffic to app server using  
> mod_jk load balancer.
>
> Now I need to do the following:
>
> 1. If request comes from URL /AB and content of URL /AB has content  
> in certain format then forward it to mod_jk otherwise forward it to  
> some other URL (external system in our case).
> 2. Make sure that when apache forwards the requests to external URL,  
> session from client is still active.
>
> My obvious questions are:
> 1. Can I do the above using rewrite rules?
> 2. Can I use perl in rewrite rules to parse through the content and  
> somehow tell apache to re-direct the request? What's the best way to  
> do that? In terms of performance, efficiency etc.
> 3. If rewrite forwards the request then does it still maintains the  
> session from client -> WebServer -> External system?
>
> I need your advise.
>


---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org