Using yoursite.com/nice_links for promotions

When doing a promotion or sending links by e-mail, it’s nicer to have short, speaking links like yoursite.com/discount instead of the normal link monsters. You might implement this on your server as folder name (polluting your folder structure) or use the htaccess file (where a mistake can kill the entire server).

But I suggest a simpler solution: Use a 404 error page script.

Most hosting companies allow you to specify a custom 404 (“not found”) error page. This page can also be a script. And the script can check if the requested URL is your promotion code and then redirect to your real page.

This can also keep you from typing (or writing on paper) long product URLs. I have set up shortcuts for all my products. If I want someone to have the link of the 1-Click Duplicate Delete for Outlook page, I can simply write this link:
easy2sync.com/1cddo
Instead of:
http://www.easy2sync.com/en/produkte/1-Click-Duplicate-Delete-Outlook.php
(Which is so long that some mail clients print into 2 lines, effectively breaking it.)

Here’s the PHP script for that:

<?php
if (getenv("REQUEST_URI")=='/1cddo')
{
 header ('Location: http://www.easy2sync.com/en/produkte/...
 exit;
}
?>
<html><head><title>Error!....

Leave a Reply

You must be logged in to post a comment.