PDA

View Full Version : New site redirect old products links



Rainbow6
07-09-2011, 01:59 AM
Hi, I have just launched a new website based on a existing site my products on the old site had links as below:

products.asp?tid=&pid=130
products.asp?tid=&pid=128

Now I have products urls such as

my_product_name

How do I got about re-directing the old links to my new site? The new site is written in php and the old site asp.

Thanks.

deepsand
07-09-2011, 03:43 AM
You seem to be describing internal links on the old site.

Why would they need to be redirected?

Rainbow6
07-09-2011, 01:58 PM
You seem to be describing internal links on the old site.

Why would they need to be redirected?

So it's fine to leave them to 404 page not found?

weegillis
07-09-2011, 05:03 PM
So it's fine to leave them to 404 page not found?
That depends. Is the old site still up, or is it gone from the web?

Are they still the same products? Are you trying to keep their indexed references alive, or do want them to disappear from the index? If the latter, then yes, just leave them with 404 so the SE's will see it and remove them. If the former, then you will want at the very least a blanket redirect from the old site (assuming it is still up) to the new one. If the site is gone, (no namespace) then there is no form of redirect you can use, and your new site will have to strike out fresh.

You don't want 404 coming up for anything in the index if you still want to use that reference, that's the main thing. Perhaps you can narrow the field to just redirect a group of old pages to a new main catalog page for that group?

Rainbow6
07-09-2011, 05:22 PM
That depends. Is the old site still up, or is it gone from the web?

Are they still the same products? Are you trying to keep their indexed references alive, or do want them to disappear from the index? If the latter, then yes, just leave them with 404 so the SE's will see it and remove them. If the former, then you will want at the very least a blanket redirect from the old site (assuming it is still up) to the new one. If the site is gone, (no namespace) then there is no form of redirect you can use, and your new site will have to strike out fresh.

You don't want 404 coming up for anything in the index if you still want to use that reference, that's the main thing. Perhaps you can narrow the field to just redirect a group of old pages to a new main catalog page for that group?

The old site has been recently re-worked re-coded etc, better meta keywords (if they still count) and descriptions, Better page content and page speed and so on. Pretty much the same products just with cleaner url's. Hopefully the new site will 'strike out' like you say.. Just wanted to know the best way to handle this I have built a few 'new' sites before but never taken one over with a few hundred products. And really just need to know the best way to go about handling those old links.

deepsand
07-09-2011, 05:23 PM
So it's fine to leave them to 404 page not found?
In order to get a 404, one first has to click on a link, or enter the URL into a browser's Address/Location bar.

If the old site is no longer up, how is anyone going to find those old internal links?

Rainbow6
07-09-2011, 06:39 PM
In order to get a 404, one first has to click on a link, or enter the URL into a browser's Address/Location bar.

If the old site is no longer up, how is anyone going to find those old internal links?

When I search google for products within my site I see the old links in search results when I click then I get the 404 page not found from my current site.

The old site has just been re-built.

deepsand
07-09-2011, 08:56 PM
So, there are now two sites, presenting the same content, but in a different context and/or manner?

Are you reverting to the old site? Or, do you intend to continue with both?

williamc
07-09-2011, 09:13 PM
How do I got about re-directing the old links to my new site? The new site is written in php and the old site asp.

To answer the OPs question, here is a tutorial on 301 redirects: http://www.stepforth.com/resources/web-marketing-knowledgebase/how-to-302-redirect/

To answer deepsands initial question, he would want to redirect old product urls to the new format urls for the same products for several reasons:

one being that the pagerank will be reassigned properly to the new url, and two being that any old urls still showing in serps get redirected to the 'proper' product page making sure the end user gets where they wanted to be.

deepsand
07-09-2011, 09:39 PM
The theoretical issues are fully understood.

It is the facts on the ground that are slow to come in; and, which now seem to be changing.

weegillis
07-09-2011, 10:43 PM
We can take it, then, that the domain is unchanged, only the site skin/navigation, etc.? In this case you must redirect or lose both the index reference and the PR for those product pages. Looks like you might need a complete list of one to one redirects.

You could trap the old URL by having .htaccess redirect everything matching that format (keeping the id value in the redirect URL) to a PHP index that parses and matches id values to a data table of product names thus far in concern. It could then just include the page module once a proper match is determined, or default to a main page if nothing is found in the list. Since the URL would be generated server side, users would see the new page, not the 404. The SE's would see the new URL (one might suspect) and not a 404 (which as we mentioned earlier will cause them to remove it and its accrued PR). No new products would need to be in this table, since their initial URL is the new format and they wouldn't be redirected.

The table could be single dimension since the id's are sequential.

$old_id = isset($id) ? isset($id) : NULL;
if($old_id) {
$product_names = array(
"dummy value",
"hedge_trimmer",
"",
"",
"edge_trimmer",
"edge_lattice",
"",
"",
"goody_lawn_sprinkler"
);
$matches = 0;
/* run a loop until match found and exit */
$product_match = "product_key.php?lookup=" . $product_names[i];
$matches = 1;
}
if(!matches || !$old_id) {
include_once 'default.inc';
} else {
include_once $product_match;
}

id=8 would match to "goody_lawn_sprinkler"

weegillis
07-09-2011, 10:56 PM
Of course, the above is only theoretical so needs a lot of careful reworking. As it is, it leaves questions unanswered, like how does the correct URL get into the location bar?

deepsand
07-09-2011, 11:24 PM
Also assumes that web server supports .htaccess. :wink:

weegillis
07-09-2011, 11:40 PM
If it's still an MS server, then 'false code' could be implemented to do the same thing theoretically described above, or simply to generate a redirect page from the old URL.

deepsand
07-09-2011, 11:56 PM
Those "old URLs" may be database driven dynamic pages.

weegillis
07-10-2011, 12:05 AM
The templates could still be retasked to the redirect purpose, though, if they can still be generated at all, and the table above could be in the database.

deepsand
07-10-2011, 12:12 AM
Concur. But, absent getting a complete and accurate description of the terrain from the OP, we're stuck with speculating.

Rainbow6
07-11-2011, 01:57 PM
We can take it, then, that the domain is unchanged, only the site skin/navigation, etc.?

Correct. The domain is unchanged.

weegillis
07-11-2011, 02:08 PM
Is the site still on an Windows server, or is it moved to an Apache/Linux? Can you still execute ASP? If so, definitely get into those templates and respond with a 301 to all those old URLs.

Rainbow6
07-11-2011, 02:30 PM
Is the site still on an Windows server, or is it moved to an Apache/Linux? Can you still execute ASP? If so, definitely get into those templates and respond with a 301 to all those old URLs.

Site moved to Apache server.. Cant execute ASP. I'm a little stuck I guess?

weegillis
07-11-2011, 03:38 PM
A little stuck, but not lost. Can we assume that you have .htaccess support on your server? Start there by creating at the very least a blanket rewrite of all old URLs to an interstitial process page as mentioned above (in theory). Something like this should work. Hopefully, now that we know where you are working from, more help will appear in this thread to guide you along. The main concern is getting rid of those 404's that the search engine and your visitors are seeing.

deepsand
07-11-2011, 04:56 PM
What you essentially need is a custom 404 handler, one that redirects requests based on the old Product No. to the new Product Name pages, and returns a 301 response code.

How big of a chore this is depends on the number of old Product No. pages there are/were.

Rainbow6
07-11-2011, 05:15 PM
Thanks for all answers. Gives me a idea of whats needed. I'll see what I can do. Thanks also for your patience with my limited knowledge. :???: