Print Page | Close Window

SEO urls and forwarding from old site

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=3802
Printed Date: 03-March-2025 at 1:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SEO urls and forwarding from old site
Posted By: BrianRoden
Subject: SEO urls and forwarding from old site
Date Posted: 24-June-2010 at 12:32pm
We recently launched a ProductCart site to replace the product details of our company site. The main site with general company info, video webscasts, free patterns, etc. is at http://www.leisurearts.com - www.leisurearts.com . The ProductCart site is shop.leisurearts.com.
 
I rewrote the  Page_Load routine for the item detail page on the other site so that it takes the item number that is passed in our previous SEO-friendly URLs, looks it up from the SKU field in the Products table, then builds a new URL to the ProuctCart SEO-friendly URL for that item and does a 301 redirect. Where I'm running into trouble is with item names/titles that have special characters in them, like the trademark symbol , the registered trademark symbol ®, and smart apostrophes/single right quotes  . I wrote my own VB function in our .net site:
 
TitleForURLUse = inputURL
TitleForURLUse = TitleForURLUse.Replace(Chr(34),
"")
TitleForURLUse = TitleForURLUse.Replace(
":", "")
TitleForURLUse = TitleForURLUse.Replace(
"'", "")
TitleForURLUse = TitleForURLUse.Replace(
" ", "-")
TitleForURLUse = TitleForURLUse.Replace(
"&", "and")
TitleForURLUse = TitleForURLUse.Replace(
",", "")
TitleForURLUse = TitleForURLUse.Replace(
"/", "")
TitleForURLUse = TitleForURLUse.Replace(
"+", "")
TitleForURLUse = TitleForURLUse.Replace(
".", "")
TitleForURLUse = TitleForURLUse.Replace(
"!", "")
TitleForURLUse = TitleForURLUse.Replace(Chr(13),
"")
TitleForURLUse = TitleForURLUse.Replace(Chr(10),
"")
which obviously isn't covering those special charcters, and so on those items with these odd characters in the title, I'm not generating the same SEO-friendly URL as ProductCart, and the redirect is failing because PC can't find the item.
 
Can someone point me to the code in ProductCart that is used for making the SEO-friendly URLs, so I can make sure I cover the same characters and redirect to a correctly-formed URL?



Replies:
Posted By: Matt
Date Posted: 24-June-2010 at 4:49pm
Try "pc/pcSeoFunctions.asp"



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net