in post: <news:MPG.1af59134bbbf3fa098a5f4@news.supernews.com>
Alfred Molon <alfred_molon RemoveThis @yahooDELETE.com> said:
> How to do it with PHP ?
stick something like the following in the img.php file in the old
directory:
header("HTTP/1.1 301 Moved Permanently");
if ($pic==1) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1</a>");}
elseif ($pic==2) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2</a>");}
elseif ($pic==3) {header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3</a>");}
etc etc etc
or you may want to use a switch instead:
header("HTTP/1.1 301 Moved Permanently");
switch($pic){
case 1: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=1</a>");break;
case 2: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=2</a>");break;
case 3: header("Location: <a style='text-decoration: underline;' href="http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3" target="_blank">http://www.molon.de/galleries/Malaysia/Ipoh/img.php?pic=3</a>");
etc etc etc
}
<a style='text-decoration: underline;' href="http://php.net/manual/en/control-structures.elseif.php" target="_blank">http://php.net/manual/en/control-structures.elseif.php</a>
<a style='text-decoration: underline;' href="http://php.net/manual/en/control-structures.switch.php" target="_blank">http://php.net/manual/en/control-structures.switch.php</a>
--
b r u c i e<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Redirecting dynamic URLs