ModRelocate was designed to replace generic clickthrough CGIs. It has the advantage that it works as a virtual document and that it will pass along additional URI arguments to the remote URL. All of this flexibility makes it easier to provide yourself with useful log information.
You can get it from either here via the web or here via ftp.
You are pretty much free to use it as you please. Check out the License file with the distribution for more details. In all likelihood I will switch to either GNU or Apache style licensing at some point in the future.
Send email to brian@tangent.org.
Send email to brian@tangent.org.
From the INSTALL file:
Do you use DSO? If so just type make and
as long as apxs is in your path all things
should go smoothly.
If you are not using DSO you should be :)
If for some reason you need to compile apache try the following:
1. Change the current directory to the directory containing your apache source distribution.
2. Call the configure script as you normally would and add the switch:
--add-module=<path-to-mod_relocate-directory>/mod_relocate.c
3. Make sure the build environment is clean by issuing the following
command:
> make clean
4. Build the new httpd binary with:
> make
5. Install the new httpd binary with:
> make install
Once you have mod_relocate set up and going, it's time to modify the httpd.conf file to use it. Add a line that says:
AddHandler relocate .reloAt this point you can create URL's in your documents like:.
http://www.tangent.org/?_URL=http://www.slashdot.org&key=valueAll key pairs other then the _URL are passed along.
Triggers are CGI's or servlets that run whenever a relocate URL is called. They have three additional environment variables that are added (RELOCATE_SCRIPT_NAME, RELOCATE_PATH_INFO and RELOCATE_QUERY_STRING) that can be used by the trigger to determine action. Please note that it is very important that triggers do not print any data out as this could cause the Locate to fail.
Yes. Just use the RelocatURLKey directive to change the _URL key to whatever you need it to be.