FAQ.


So what is ModRelocate?

Where do I get it from?

What sort of license does it have?

How can I make suggestions for it?

How can I report a bug?

How do I install it?

How do I use it?

What are the directives?

So what are triggers and what can I do with them?

I already use _URL, is there a way to change it?

So what is ModRelocate?

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.


Where do I get it from?

You can get it from either here via the web or here via ftp.

What sort of license does it have?

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.


How can I make suggestions for it?

Send email to brian@tangent.org.


How can I report a bug?

Send email to brian@tangent.org.


How do I install it?

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


How do I use it?

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 .relo 
At this point you can create URL's in your documents like:.
http://www.tangent.org/?_URL=http://www.slashdot.org&key=value
All key pairs other then the _URL are passed along.


What are the directives?

  • RelocateTrigger
  • RelocatURLKey


  • So what are triggers and what can I do with them?

    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.


    I already use _URL, is there a way to change it?

    Yes. Just use the RelocatURLKey directive to change the _URL key to whatever you need it to be.