A 301 redirect is a permanent redirect from one URL to another (although it can always be removed later). It's mostly used for Search Engine Optimization in cases where you need to:


  • Direct customers from an old product URL to a new product URL.
  • When you've changed to a new shopping cart with a new URL structure.
  • You've deleted a product and want to redirect people to a category or the home page.


Note: At the end of this article, you'll find an attached 301 redirect syntax creator you can download.


Applies to Version(s): 3.7.x to 3.9.x  Series


In this article, you will learn:

Where to add the 301 Redirect

A Template to Easily Create Your 301 Redirect Syntax


Where to add the 301 Redirect

Pinnacle Cart’s .htaccess file heavily uses mod_rewrite to accomplish search engine friendly URLs. You will want to use mod_rewrite redirects rather than the standard mod_alias redirects that most people are accustomed to. In Pinnacle Cart, we have a feature that allows you to customize the .htaccess file using the admin area of the cart  (in older versions of the cart, the only way to make changes of this nature was to edit the .htaccess file directly, which usually causes issues since Pinnacle Cart rewrites the .htaccess file from time to time based on changes made to the settings in the admin area). 


Note: This feature is recommended for advanced users only.


To get to this area, follow the steps below:


In the 3.7.X series:

  1. Go to Cart Settings > Global Cart Settings > Search Engine Optimization.
  2. From here you will see a text area labeled 'Htaccess Overrides'.


In the 3.8.X series:

  1. Go to Marketing > Search Engine Optimization.
  2. From here you will see a text area labeled 'Htaccess Overrides'.

3.8 series .htaccess overrides

In the 3.9.X series:

  1. Go to Marketing > SEO Settings.
  2. From here you will see a text area labeled 'Htaccess Overrides'.

3.9 series .htaccess overrides


In the e-commerce industry, the most common need for 301 redirects is to redirect old product URLs to new product URLs, which helps preserve SEO when switching shopping cart platforms. The example below shows how to redirect http://example.com/old_file_name_123.php to http://example.com/newcart/newfilename.html:


RewriteRule ^old_file_name_123.php http://example.com/newcart/newfilename.html/ [L,R=301]


A rule similar to the one above can be copied and pasted into the Htaccess Overrides section of the cart admin and will be placed into the proper section of the cart's .htaccess file. This override will also be preserved throughout any other setting changes, so essentially this is a plug-and-play feature. Mod_rewrite is extremely powerful, and with the combination of the standard flat URL features in the cart and the ability to add custom overrides, there is really no limit to what it can achieve.


Note: Please be advised that custom code is outside of our scope of support and we strongly suggest doing your own research on mod_rewrite to become more familiar with this technology.


A Template to Easily Create Your 301 Redirect Syntax

Attached at the end of this article is a spreadsheet that you can use to easily create your redirects. Included as well are the example URL changes. Below, we will show you how one of the examples works.


Let's say your site is totallybabyclothes.com. You've replaced an old product with a new version and you'd like to direct customers to this new product if they happen to stumble upon the old URL in a Search Engine. The old URL is http://www.totallybabyclothes.com/blankets/green-toddler-blanket/ and the new URL is http://www.totallybabyclothes.com/blankets/green-velour-toddler-blanket/. In the .csv template provided, you would do the following:

  • In Column A, you will enter the old URL.

Ex: blankets/green-toddler-blanket/

It may or may not end with a forward slash. It will just depend on how your link was/is coded.


  • In Column B, you will enter the new URL.

Ex: blankets/green-velour-toddler-blanket/

This will automatically fill out Column C with the actual 301 Redirect syntax, like so: RewriteRule ^blankets/green-toddler-blanket/$ blankets/green-velour-toddler-blanket/ [R=301,L]


  • In Column D, we recommend filling out notes on the purpose of the change, although it's not necessary.
  • In Column E, you can put the date if you'd like.


Once completed, you would copy the value in Column C, go to the .htaccess Overrides section of your admin, and paste it in. After saving, you would be able to test the redirect by navigating to the old URL, http://www.totallybabyclothes.com/blankets/green-toddler-blanket/. It should automatically redirect to the new URL.


The .csv template is a great tool to use to mass produce the syntax needed for bulk 301s.


Links to Related Articles


Search Engine Optimization


If you didn't get your question answered, please contact the Pinnacle Cart Support Team. To submit a ticket, go to the My Account drop-down menu at the top right of the admin area and select Support.