PDA

View Full Version : Can't successfully redirect


pctechbytes
04-18-2007, 10:02 PM
I am running version 2.103 and I am having a problem redirecting old categories to their new categories.

For instance:

http://www.pcrepairdirectory.com/new-york-computer-repair/

to

http://www.pcrepairdirectory.com/pc-service/new-york-computer-repair/

It provides the following result:

http://www.pcrepairdirectory.com/pc-service/new-york-computer-repair/?category=new-york-computer-repair

<<<edit, the above links are truncated in forum>>>

Which you can see all the extra garbage on the end. Is there a way to do this int he .htaccess file? I have used redirects in the past with other files but have never seen this happen. I have submitted support tickets, in which they edited the index.php file to fix two of these redirects, but I have dozens that need to be moved and editing the index.php file for all of those entries will be rough.

Thanks in advance.

pctechbytes
04-19-2007, 02:25 AM
Or can anyone tell me how to redirect all 404s to, say, my index page. Right now our directory has hundreds of links floating aound in search engines and all of those links are returning 404 errors because the directory has moved. Thanks.

Sergey Ten
04-20-2007, 05:08 AM
Hello pctechbytes,

Please try to do the following:

[ Open your index.php ]
[ Find code ]


if (empty($category))
{
$_GET['error'] = "404";
include(HOME."error.php");
exit;
}


[ Replace with ]


if (empty($category))
{
$_GET['error'] = "404";
include(HOME."index.php");
exit;
}


[ Save change ]