Location: PHPKode > scripts > plusPHP Easy Short URL > plusphp-easy-short-url/ReadMe.txt
Copyright (c) 2007-2008, Pavel Kouznetsov ( hide@address.com )

URL Shortening Software v. 1.6

For newest version of this instruction please visit this page:


Installation procedure looks like file copying (keep the folders structure) 
+ change permission for _addresses folder (read/write/exec permissions - 0777 )
+ change ads codes in files inside _pages folder
+ .htaccess changes if needed (see below)

All pages can be found in folder _pages - edit files there to change advertising to your own.

Data files with links are stored in _addresses folder - make sure it has read/write permissions.

Configuration file _config.php - please see it and change according to your needs 
(it is good as is but check it anyway - there is a string to turn off mod_rewrite functionality if you have problems with it).

Premium version of the software with full functionality can be obtained on plusphp.com site.

If you have any difficulties installing the software - feel free to contact author via e-mail hide@address.com

.htaccess Changes

By default .htaccess file has settings for software installed in site's root directory.
If you are installing the software into sub-directory - change these strings 
(if they are presented in your version)

RewriteBase /
ErrorDocument 404 /plus.php 

like this: 

RewriteBase /subdir/another-subdir/
ErrorDocument 404 /subdir/another-subdir/plus.php

Advertisement Placement

To display ads you don't have to edit HTML (unless you want to change ads placement) - just put advertisement codes into text files in _pages directory (ads_bottom.txt and ads_top.txt)

Redirect Page

If you want to display page "Redirecting to URL in XX seconds" you have to set variable $_ads value like this: $_ads = 1; (string 15 in _config.php)

If you don't want to display page "Redirecting to URL in XX seconds" make $_ads equal to 0 ( $_ads = 0; )

If you want to display ads page for every 2nd,3rd, 4th (and so on) redirect - change variable to $_ads = 10; (or $_ads = 5;) - lower number = more often ads display.

If you want to change longiness of "Redirecting to URL" - change variable $_longiness = 10; (line 28) according your needs.


If your host support mod_rewrite - change variable 

$_rewrite_mode = false; 
$_rewrite_mode = true;

(config file, line 42)

SEOed mode

To force your service output "SEOed html-page-like" URLs (example: http://site.com/keyword.html) change variable in config file (line 46):

$_seo_links = true;

Note: site have to work in mod_rewrite mode.

mod_rewrite Troubles

mod_rewrite and .htaccess can be a major pain - especially if higher level directories on your server 
have their own .htaccess files and interfere with one in this package. This software can work without 
mod_rewrite using 404 redirect - but if you cannot force the software to work in "mod_rewrite mode" 
at all (permanent 500 server error):

1) try to add "RewriteBase /software/dir/here/" string after "RewriteEngine On" as stated above;

2) if RewriteBase didn't help - edit .htaccess file and keep just 2 strings in it 
(note: /plus.php have to be valid URI - i.e. change directory according real location of plus.php file):
DirectoryIndex plus.php index.php index.htm index.html
ErrorDocument 404 /plus.php

3) if that didn't help - delete .htaccess file in directory there you've installed software;

4) change _config.php file - string 42 in 1.6 version - from $_rewrite_mode = true; to $_rewrite_mode = false;

After this procedure shortened links will look like http://yourhost.com/?short-link

You can change software mode back to "mod_rewrite" at any moment later by installing/activating mod_rewrite and rewriting .htaccess.


Site has API to allow manipulations from distant sites. If you use URL like


engine will automatically print out new shorter URL for the "http://www.site-to-hide.com/longer/url/here.html" -
something like


"Send to Email" Template Editing

Software can send shortened links to email(s). To edit e-mail's template open file mail.txt in _pages folder and edit it.
Variables used:
_URL_ - there shortened URLs will be placed
_IP_ - sender's IP address (to trace it if needed)
_TIME_ - time to trace sender (in case if s/he used dynamic IP)
_SITE_ - your site's address (well, service's URL to be exact)

Application Files List

index.php - unimportant file in root directory
plus.php - main processing file
_pages/ads.php - redirect page
_pages/start.php - start page
_pages/wrongURL.php - wrong URL processing
_pages/post_process.php - URL processing file
_pages/errors.php - errors description

Note: .htaccess placed files in foldres to prevent direct access to files (same for index.php - they just redirect visitors to upper level directory).

License agreement.

You can use this software on unlimited number of domains + modify it according your needs.

You cannot resell this software unless you giving away full rights to it - 
in this case you have to remove all copies of the software distributed on your servers (sites) 
+ tell new owner ID of your purchase order.

You are eligilbe to receive all updates till next full version for free (i.e. if you've purchased version 1.6 - you can obtain version 1.9 for free).

If you'll find any bugs in the code - feel free to report them and ask for debugged version of the software (include your purchase order ID in the report).

This software distributed without any warranties and guarantees. It may change, damage, destroy or boost your
hardware, software and karma - use it on your own risk.
Return current item: plusPHP Easy Short URL