The Director! is essentially a URL redirection/shortening service. Similar to tinyurl.com or many of the other ones in existence.
The difference? I wrote this, and I didn't write the other ones and probably lots of other stuff that I don't know about the other ones.
But seriously, this is a service you can deploy for yourself or your clients without relying on other services. This comes with the same issues as other services:
Status | Released (Download - 35.9kb) |
---|---|
Released Verion | 0.1 (Change Log - Release Date: June 28, 2010) |
In Development | 0.2 (Roadmap - Release Date: ???) |
Bugs/Bug Tracker | http://bugs.cornempire.net/view_all_bug_page.php?project_id=1 |
The Director! is written using PHP, designed to run on apache. Its most useful feature relies on the apache rewrite module. The Director! breaks down like this:
Development of The Director! will take place in a number of phases, with a release after each phase. Features of each phase will be discussed below.
You will need PHP, apache (with mod_rewrite for nice redirection), and a mysql database available (it is possible to share a database, but that requires additional configuration on your part)
mysql> create database director; <-- You can skip this step if you use the mysql command line tool to create the DB. If you create the DB ahead of time, you will need to comment out the first line of the db.sql script. Query OK, 1 row affected (0.00 sec) mysql> create user 'director'@'localhost' IDENTIFIED BY 'somepass40ouioei54#9$#$'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON director.* TO 'director'@'localhost' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)
define('DBHOST','localhost'); //Database host, most likely localhost define('DBUSER',''); //Username of your database user define('DBPASS',''); //Password of your user define('DB','director'); //The name of the database. Change this if you have to share a database define('DEBUG',false); //Probably want to leave this false unless you are developing something new for it define('DBPREFIX',''); //This is the DB Prefix, if you are sharing a database, and had to modify the db.sql file, add that prefix here. if(DEBUG){ error_reporting(E_ALL); ini_set("display_errors", 1); }
RewriteEngine on RewriteRule ^/go/(.*) /scripts/director.php?linkname=$1
In the above example /go/ is the virtual directory where all of our redirects will point: http://www.cornempire.net/go/somelink
/scripts/director.php is where The Director! is installed. This command rewrites any request that comes to our site in our virtual directory go, and passes it to director.php which looks up where the user is trying to get, and forwards them there.
If you get an error like this, you have an incorrect password or user entered, or have the permissions messed up. Start from the top of the installation instructions and make sure that you created the database user correctly, and that you created the config.php file with the correct values.