>Number: 3517 >Category: mod_proxy >Synopsis: PATCH: new function Proxy_Substitute: Substitute a requested >URL with another URL >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: change-request >Submitter-Id: apache >Arrival-Date: Wed Dec 9 20:10:00 PST 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: apache_1.3.3 >Environment: Operating system: Linux Linux michael 2.0.33 #6 Sat Apr 25 00:12:55 MET DST 1998 i486 >Description: This is a modification to mod_proxy.c which makes a powerful substitution available.
The default configuration file is /etc/proxy_substitute.conf If it is not found, no substitution takes place and apache works like if these changes weren't there. The syntax in the configuration file is the following substitute http://one.site.com/this/should/be/replaced.html http://another.site.com/this/should/also/be/replaced.html with http://the.new.site.com/this/is/the/destination.html This means two documents will be replaced with one page. But there is also a "*" at the end of an URL allowed: substitute http://advertising.site.com/spamconsoles/* with http://my.site.com/directory/closespamconsole.html This will replace everything in the directory /spamconsoles of the host advertising.site.com with the given document on my.site.com. So many documents in a tree are replaced with one document. This is really useful for surfing on some sites who use popup-consoles for advertising- purposes. You can now replace the locations of the popup-consoles with a local document on your apache web-server which just closes these windows. This saves some bandwith because the advertising documents (which you most likely dont want) are not loaded from the internet and you don't need to close all these windows manually. The "*" is even allowed in the destination path: substitute www.my.site.com/apache-mirror/* with http://www.apache.org/* This would mirror the complete apache-website into the "/apache-mirror"-directory on www.my.site.com So if you request www.my.site.com/apache-mirror/directory/apage.html you would get the page from http://www.apache.org/directory/apage.html >How-To-Repeat: #example configuration for closing spam consoles... (replace with your own config) substitute http://members.tripod.com/adm/popup/* http://www.geocities.com/ad_container/* http://home.talkcity.com/homepopup.html* with http://my.apache.server.com/close_spam_console.html end >Fix: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]
