URL redirects are useful when you change product names, reorganise categories, or migrate from another platform.

Method 1: CubeCart’s Built-in Redirect Manager (Recommended)

Navigate to Admin > Settings > SEO to manage URL redirects directly within CubeCart.

Method 2: Apache .htaccess Rules

Add redirect rules to .htaccess after the RewriteEngine On line:

Single Page Redirect (301 Permanent)

RedirectMatch 301 ^/old-page$ /new-page

Redirect with Query String

RewriteRule ^old-path/?$ /new-path [R=301,L]

Redirect an Entire Directory

RedirectMatch 301 ^/old-category/(.*)$ /new-category/$1

Method 3: Nginx Redirects

location = /old-page {
    return 301 /new-page;
}

301 vs 302 Redirects

  • 301 (Permanent): Tells search engines the page has moved permanently. Use for most redirects.
  • 302 (Temporary): Tells search engines the move is temporary.