I switched from PhotoPost to vBAdvanced Gallery a long time ago, and I created some PHP files to redirect the old links to the new links, but I would like to replace these with .htaccess entries and do a 301 redirect. Can anyone help?
Here are my redirect scripts:
/photopost/showgallery.php:
Code:<? $PATH_INFO = getenv("PATH_INFO"); if ( isset($PATH_INFO) ) { $test = explode('/', substr($PATH_INFO,1)); for($i=0; $i < count($test); $i++){ if($i % 2 == 0){ $$test[$i] = $test[$i+1];} } } if (!isset($photo) ) { header("Location: /gallery/browseimages.php?c=" . $cat . "&u=" . $ppuser); } else { header("Location: /gallery/showimage.php?i=" . $photo . "&c=" . $cat . "&u=" . $ppuser); } ?>
/photopost/showmembers.php:
/photopost/showphoto.php:Code:<? $PATH_INFO = getenv("PATH_INFO"); if ( isset($PATH_INFO) ) { $test = explode('/', substr($PATH_INFO,1)); for($i=0; $i < count($test); $i++){ if($i % 2 == 0){ $$test[$i] = $test[$i+1];} } } if (!isset($photo) ) { header("Location: /gallery/browseimages.php?c=" . $cat . "&u=" . $ppuser); } else { header("Location: /gallery/showimage.php?i=" . $photo . "&c=" . $cat . "&u=" . $ppuser); } ?>
Code:<? $PATH_INFO = getenv("PATH_INFO"); if ( isset($PATH_INFO) ) { $test = explode('/', substr($PATH_INFO,1)); for($i=0; $i < count($test); $i++){ if($i % 2 == 0){ $$test[$i] = $test[$i+1];} } } if (!isset($photo) ) { header("Location: /gallery/browseimages.php?c=" . $cat . "&u=" . $ppuser); } else { header("Location: /gallery/showimage.php?i=" . $photo . "&c=" . $cat . "&u=" . $ppuser); } ?>


LinkBack URL
About LinkBacks





Reply With Quote
