This software redirects requests to various directories based on whether or not a user exists in one or more database tables.
To get started, simply use the following SYNOPSIS code:
PerlModule Apache::DBI
Apache::RedirectDBI
< Location /path/to/virtual/directory >
SetHandler perl-script
PerlHandler Apache::RedirectDBI
PerlAuthenHandler Apache::AuthenDBI
PerlSetVar Auth_DBI_data_source dbi:Oracle:CERT
# and other Auth_DBI_* variables
PerlSetVar RedirectDBI_data_source dbi:Oracle:CERT
PerlSetVar RedirectDBI_username nobody
PerlSetVar RedirectDBI_password nobody
PerlSetVar RedirectDBI_location /path/to/virtual/directory
PerlSetVar RedirectDBI_default /path/to/virtual/directory.1
PerlSetVar RedirectDBI_table2uri "t1 /directory.2 t2 /directory.3"
PerlSetVar RedirectDBI_field DB_field_name_containing_username
PerlSetVar RedirectDBI_url DB_field_name_containing_redirect_url
PerlSetVar RedirectDBI_external External_REDIRECT_is_issued
AuthName "Realm"
AuthType Basic
Require valid-user
< /Location >
With these variables set up, requests for access to the virtual path should require a username and password. Once entered, the module looks up the username in one or more database tables to determine the physical path from which files are served.
Apache::RedirectDBI offers both internal and external redirects. With internal redirects, files are served to the user without the URL changing. External redirects, on the other hand, send the user's web browser to the desired URL.
If a user is not in any of the database tables, they will be redirected to a default location. Overall, Apache::RedirectDBI is a great tool for managing and redirecting requests for virtual directories.
Version 0.02: N/A