Forum Moderators: phranque

Message Too Old, No Replies

RewriteRule to map images to a lightweight server on the same machine

         

simonvlc

5:10 pm on Jan 15, 2007 (gmt 0)

10+ Year Member



Hi all,

I have an apache server with a lighttpd installation on the same machine to serve the static content. The lighttpd server is binded to localhost, so it´s innaccesible from outside.

The configuration works fine, but I have to modify some config files on the server for each domain I want to use this method.

Is there any form to achieve this only with an htacess RewriteRule? I was trying with a variant of this, without success.

RewriteRule ^(.*).(jpe?g¦gif¦bmp¦png)$ [0.0.0.0:8080...] [NC,P,L]

Any idea? Thanks in advance, Simon.

jdMorgan

5:36 pm on Jan 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd suggest:

RewriteRule ^([^.]+\.(jpe?g¦gif¦bmp¦png))$ http://localhost:8080/$1 [NC,PT]

Jim

simonvlc

8:16 pm on Jan 16, 2007 (gmt 0)

10+ Year Member



Thanks Morgan, but it didn´t work. It says Bad Gateway.

Any other idea? Thanks in advance.