Latest Articles related to all categories. Microsoft, Twitter, Xbox, Autos and much more

Full width home advertisement

Post Page Advertisement [Top]

Although having an automated site is great, sometimes the rather long URLs they generate for sub-pages aren't very user friendly. These long addresses are hard to put on business cards, or to pass along to friends.

To make them more friendly you could use one of the many, many short URL services, but most come with strings. Or you can setup something similar right on your own website, using a PHP forward. Here is how:

1.) Create an easy to remember file name or folder, such as http://www/yoursite.com/mylink.php or http://www.yoursite.com/link. If you are creating a folder, the file inside the folder that holds the code would should be named index.php

2.) Put this code into your file:

<?php 
header( 'Location: http://www.yoursite.com/this/is/a/long/url/you/want/to/direct/to.php' ) ;
?>
Make sure you replace our long URL with the one you want to direct to.

3.) Upload the file, and share your new short URL with friends!

No comments:

Post a Comment

Bottom Ad [Post Page]