FAQ.


So what is Mod Random?

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?

What are the directives?

How do I use random quotes?

What is the difference between a quote and an ad?

What is RandomURL?

Can you give me an example of using RandomURL?

Can you give me an example of using RandomAd to generate its own pages?

What is the future?

So what is Mod Random?

Mod Random provides three services. The first service is as a redirector. You feed it URLs and it will redirect to random URLs that you have loaded. The second is that it provides environmental variables that can be used for doing ad banner systems. The third is that it can be used to display entire pages of random html. It uses its own custom handlers in combination with with random ads and quotes that you feed into the system.


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?

Enter your bug here here.


How do I install it?

Go look at the instructions here.


What are the directives?


How do I use random quotes?

First, is has to be turned on in your virtual host/httpd.conf root by putting on a line "RandomEngine On". After that you will need to create a list of random quotes that it will use. This is done simple by either feeding in quotes one bt one in your httpd.conf file via RandomQuote, or by feeding in a file's worth by giving RandomQuote a file path.. In your PHP, perl, java servlet or SSI script you will need to look for the environmental variable "RANDOM_QUOTE" to retrieve the text. RandomQuote takes a second parameter which is a "section". If you specify a section, then the quote will be added to that section (and the section name is used as the name of the environmental variable). These environmental variables are available to all requests unless you use RandomHandler to restrict them down to specific handlers.


What is the difference between a quote and an ad?

RandomAd feeds entire files into the system. If you give it the name of a directory, it will load all regular files from that directory into the system.


What is RandomURL?

Random URL loads either single urls or entire files of URLs into the system. These are used to do redirects.


Can you give me an example of using RandomURL?

Here you go:

<Location /random>
SetHandler random
RandomURL http://www.slashdot.org/
RandomURL http://www.tangent.org/
RandomURL http://www.freshmeat.net/
RandomURL http://www.linux.org/
RandomURL /usr/local/apache/conf/random.conf
<Location>


Can you give me an example of using RandomAd to generate its own pages?

Here you go (btw, the only difference between Ads and Quotes is that with quotes the handler is random-quote-page:

<Location /ads>
SetHandler rrandom-ad-page-ad-page
RandomAd /usr/local/apache/servers_ad
RandomAd /usr/local/ads/
RandomAd "<P>This is an add</P>"
<Location>


What is the future?

At some point I may add weighting factors so that certain URL's appear more frequently then others. Other then that I'll add what people suggest.