RE: [phplib] Site Linking From: Peter Bowyer (reywob <email protected>)
Date: 06/24/01

At 11:53 PM 6/23/01 +0100, you wrote:
>i think that we may have got our wires crossed on this one:
>
>i don't neet a redirection basically what i want is to create a cgi or php
>file that will store all my links for my website:

 From the code he gave you, you could have developed your own
solution. Remember, most of us have other things to do - we can't write
everyone a piece of code for free which will do exactly what they want!

However, I've included how I would do it below. One downside of doing this
is that some search engines will not index all the pages, as they don't
like a ? in the URL.

<?php
/*
  * Link Redirect script
  * Copyright Peter Bowyer, All rights reserved.
  * http://www.mapledesign.co.uk email: admin <email protected>
  * This script may be freely used provide this notice is left intact.
  */

$page = array (
       0 => "index.php",
       1 => "photos.php",
       2 => "links.php"
       );
// Usage: redirect.php?link=2
// You may wish to change the following to
// header("Location: http://www.yoursite.com/$page[$link]");
// so that if you have pages in sub-directories it will still work, as you
// specify the path from the root directory above in the array.

header("Location: $page[$link]");
?>

--oOo--
Narrow Gauge on the web - photos, directory and forums!
http://www.narrow-gauge.co.uk
--oOo--
Peter's web page - Scottish narrow gauge in 009
http://members.aol.com/reywob/
--oOo--

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>