Forward proxy with Rewrite directive... why not working? help me!

Discussion in 'Apache' started by dm01, Jul 13, 2012.

  1. #1
    Hi,

    I have an Apache server configured as Forward Proxy on port 8080.

    Now I wish to forward all requests to the correct external sites,
    except a single file, which has to be redirected to a local file,
    so I was thinking about something like this:

    RewriteRule ^www\.externalsite\.com\/images\/picture\.png$ http://localhost:8080/images/forbidden_picture.png

    but it has no effect.

    I then tried something simpler, please see an extrct from httpd.conf:

    ProxyRequests On
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^old\.html$ new.html [PT]

    but even this is not working: it keeps loading the old.html file.

    What am I missing?

    Thanks!!!

    [TABLE="class: cf gz ac3"]
    [TR]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD="class: io"][/TD]
    [/TR]
    [/TABLE]
    [TABLE="class: cf FVrZGe"]
    [TR]
    [TD="class: amq"][​IMG][/TD]
    [TD="class: amr"][/TD]
    [/TR]
    [/TABLE]
     
    dm01, Jul 13, 2012 IP