Until last month i was using a 3rd party cms for my site. After 2 months of work i managed to write from scratch my own custom cms as a vb product. I managed to preserve most of the urls but i had to change some. So i need help to redirect them. If it was 1-2 i wouldn't care but we talk about 11000 indexed links by yahoo and google. I plan to use vbseo functions for the cms in the future but it will take some time (study vbseo) as i plan to use the page titles for the ulrs rathen than using the easy way page.php?id=xx => page-xx.html.
Anyway...
Example old to new
plug.php?e=terms => terms.php
plug.php?e=gpudb => gpudb.php
When it comes to htaccess i suck so i made a small php script to redirect the old urls to the new ones, with adding header 301.
file plug.php
PHP Code:<?PHP
$url = $_SERVER['REQUEST_URI'];
$parsed = parse_url($url);
parse_str($parsed['query'], $output);
header("HTTP/1.1 301 Moved Permanently");
switch($output['e'])
{
case 'terms':
if(!empty($output['ltr']))
{
header("Location: http://www.3dacc.net/terms.php?ltr=".$output['ltr']);
}
elseif(!empty($output['item']))
{
header("Location: http://www.3dacc.net/terms.php?item=".$output['item']);
}
else
{
header("Location: http://www.3dacc.net/terms.php");
}
break;
case 'startupdb':
if(!empty($output['ltr']))
{
header("Location: http://www.3dacc.net/startup.php?ltr=".$output['ltr']);
}
elseif(!empty($output['item']))
{
header("Location: http://www.3dacc.net/startup.php?item=".$output['item']);
}
else
{
header("Location: http://www.3dacc.net/startup.php");
}
break;
case 'gpudb':
case 'revdb':
if(!empty($output['series']))
{
header("Location: http://www.3dacc.net/gpudb.php?series=".$output['series']);
}
elseif(!empty($output['id']))
{
header("Location: http://www.3dacc.net/gpudb.php?id=".$output['id']);
}
else
{
header("Location: http://www.3dacc.net/gpudb.php");
}
break;
default:
header("Location: http://www.3dacc.net");
break;
}
?>
Everything works fine but i wonder about search bots, is it a good enough or do i need you to help me with htaccess ???
Thanks in advance


LinkBack URL
About LinkBacks





Reply With Quote