Forwarding a file, not whole directory

Hi everybody,

Some hand is needed here... :)

How can I specify, that request to one file should be redirected?

I have this:

<VirtualHost *:80>
<Location /MyApp/>
ProxyPass ajp://localhost:8010/MyApp/
</Location>
</VirtualHost>

and now I would like to add this (request to single file to be redirected to THE OTHER tomcat):

<VirtualHost *:80>
<Location /MyApp/myFile.html>
ProxyPass ajp://localhost:8011/MyApp/MyFile.html
</Location>
<Location /MyApp/>
ProxyPass ajp://localhost:8010/MyApp/
</Location>
</VirtualHost>

is this the right way to achieve this?

Thank you in advance,
Milan





------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Milan Tomic [ Mo, 15 März 2010 10:19 ] [ ID #2035098 ]

Re: Forwarding a file, not whole directory

On Mon, Mar 15, 2010 at 5:19 AM, Milan Tomic <tomicmilan [at] yahoo.com> wrote:
> Hi everybody,
>
> Some hand is needed here... :)
>
> How can I specify, that request to one file should be redirected?
>
> I have this:
>
> <VirtualHost *:80>
> =A0<Location /MyApp/>
> =A0 =A0ProxyPass =A0ajp://localhost:8010/MyApp/
> =A0</Location>
> </VirtualHost>
>
> and now I would like to add this (request to single file to be redirected=
to THE OTHER tomcat):
>
> <VirtualHost *:80>
> =A0<Location /MyApp/myFile.html>
> =A0 =A0ProxyPass =A0ajp://localhost:8011/MyApp/MyFile.html
> =A0</Location>
> =A0<Location /MyApp/>
> =A0 =A0ProxyPass =A0ajp://localhost:8010/MyApp/
> =A0</Location>
> </VirtualHost>

try it and see, then try reversing the order.

--
Eric Covener
covener [at] gmail.com

------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Eric Covener [ Mo, 15 März 2010 15:14 ] [ ID #2035104 ]
Webserver » gmane.comp.apache.user » Forwarding a file, not whole directory

Vorheriges Thema: Conditionally Setting HTTP Response Header
Nächstes Thema: : user logged out frequently while using reverse proxy