• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Scribbit
#1 Posted : Monday, May 11, 2015 12:42:22 PM(UTC)
Scribbit

Rank: Member

Joined: 3/25/2014(UTC)
Posts: 15
United States
Location: Bedford, NH

Thanks: 3 times
I'm looking to add a rewrite rule to address a url structure name change from /Products/Name to /Parts/Name Any suggestions would be appreciated. Thanks

Old Link Example
http://www.propartsdirec...Mower-Blade__93005.aspx

New Link Example
http://www.propartsdirec...Mower-Blade__93005.aspx


Scribbit
#2 Posted : Monday, May 11, 2015 1:29:46 PM(UTC)
Scribbit

Rank: Member

Joined: 3/25/2014(UTC)
Posts: 15
United States
Location: Bedford, NH

Thanks: 3 times
Is there a way to do this globally for all links using this link structure
/products/
/parts/
Aaron
#3 Posted : Monday, May 11, 2015 2:36:08 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
When you say "rewrite" do you actually mean "redirect"?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Scribbit
#4 Posted : Monday, May 11, 2015 2:54:31 PM(UTC)
Scribbit

Rank: Member

Joined: 3/25/2014(UTC)
Posts: 15
United States
Location: Bedford, NH

Thanks: 3 times
Yes, it would be great if there was a rewrite link structure that would take all cached links that have /products/ to /parts/ which is what the site is using now. Prob is there are over 3k links and we have been adding them one by one to the redirects file. Something more universal would be better. A month ago the link structure was updated and it doesn't look like BV auto wrote a rule to redirect all those broken links to new.
Aaron
#5 Posted : Monday, May 11, 2015 4:50:36 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: Scribbit Go to Quoted Post
YProb is there are over 3k links and we have been adding them one by one to the redirects file. Something more universal would be better.

Unfortunately the redirector in 2013/2015 does not handle regular expressions in the redirect to URL (only the request URL); otherwise it could be simple. However, you should be able to easily create all of the redirects using the import/export tool. Follow these steps:

  1. Export redirects (Content >> URL Redirects) -- this gives you the file format to use for an import.
  2. Export the entire product catalog.
  3. Open both exported files in Excel.
  4. In the redirects.txt remove all of the records (if there are any) leaving only the header row. Also remove the IsRegex and LastUpdated columns -- we don't need them for this.
  5. From the products.txt file copy the Bvin field into the SystemData field in the redirectst.txt file.
  6. From the products.txt file copy the RewriteUrl field into both the RedirectToUrl and RequestedUrl fields in the redirects.txt file.
  7. Now do a search/replace on the RequestedUrl to convert the new URL format to the old one (e.g. replace "/Products/" with "/Parts/").
  8. Set the StatusCode field to "301" (no quotes) for each record.
  9. Set the RedirectType field to "1" (no quotes) for each record -- this tells the redirector that this is a product redirect and it uses the bvin value in the SystemData field to match up the record to the product. This is used so that future changes to the product's URL will update existing redirects to the new URL.
  10. The Bvin field should be blank -- this is how the import knows to perform an insert rather than an update.
  11. Run the import!


Originally Posted by: Scribbit Go to Quoted Post
A month ago the link structure was updated and it doesn't look like BV auto wrote a rule to redirect all those broken links to new.

It sounds like you're saying that someone changed the URL "prefix" for products (Options >> Site Settings >> Performance). In that case, no, URL redirects will not be auto-generated.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#6 Posted : Thursday, December 29, 2016 12:14:49 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Hey Aaron,

I followed your instructions here for the url rewrite. I still can't get it to work. It keeps skipping over all of my rows. It also said IsRegex is required. I added that column but it still keeps skipping the rows. Nothing is showing up in the audit log either. Anything I am missing?

Rows added/updated: 0
Rows unchanged: 0
Rows skipped: 293
Unable to save new redirect for "/ritter-203-treatment-table.aspx".

Edited by user Thursday, December 29, 2016 12:16:46 PM(UTC)  | Reason: Not specified

Aaron
#7 Posted : Thursday, December 29, 2016 1:41:08 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Can you provide a sample import file?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#8 Posted : Tuesday, January 3, 2017 12:51:50 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
I think there may be a problem because these products had custom URLs. I did find a way around it, but attached is the import file.

Edited by user Tuesday, January 3, 2017 2:15:56 PM(UTC)  | Reason: Not specified

Aaron
#9 Posted : Tuesday, January 3, 2017 2:27:42 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
The instructions that I posted assume that you have manually-specified URLs (i.e. the RewriteUrl field has a value). Perhaps that was an oversight on my part in Scribbit's posts above. None of the products in your export have a RewriteUrl value so that's why these instructions aren't working for you.

By the way, I removed your attachment above since it contained some sensitive data that you might not want people to see.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012