---
schema_version: "1"
id: f73211e3b998eef89f02dabf8deec155f861c584e67f0582b25e67a1a6de7270
title: Static Mappings for B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_static_mappings.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_static_mappings.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9c13a53fec0ca47d36aa09961892f6d103eac8f742bd6288e355c977c78c62bd
description: Create static mappings from existing legacy URLs to new URLs in B2C Commerce. The URLs can be either dynamic pipeline calls or static resources, however, make sure that source URLs are unknown to the system. Replicate static mappings from Staging to Production instances. The file size of the configuration in Business Manager is limited to 2 MB. If you exceed the limit, use the site import and export functionality to update the static mappings.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Static Mappings for B2C Commerce

Create static mappings from existing legacy URLs to new URLs in B2C Commerce. The URLs can be either dynamic pipeline calls or static resources, however, make sure that source URLs are unknown to the system. Replicate static mappings from Staging to Production instances. The file size of the configuration in Business Manager is limited to 2 MB. If you exceed the limit, use the site import and export functionality to update the static mappings.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note Static Mappings require the configuration of a hostname alias by clicking App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then going to **Merchant Tools** | **Site** | **SEO & Discoverability** | **Aliases** module first. Use the domain name.

Each line contains one mapping definition where both parts are separated by a whitespace. To add a comment line, use an ASCII '#' or '!' as the first non-white space character in the line. Map URLs that contain whitespace by surrounding the whitespace with single quotes.

Mappings with wildcards are only valid if they are prepend OR append the URL, but can’t do both. For example, `**/a-sample-url**` is an invalid mapping.

Dynamic pipeline calls follow this syntax:

```
<legacy URL> [i] p,[<protocol>],[<host>],<pipeline>[,<locale>][,<parameter name>,<parameter value>]*
```

Static resources follow this syntax:

```
<legacy URL> [i] s,[<protocol>],[<host>],[<unit>],[<locale>],<path>
```

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col>
        <col>
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d237783e89">Parameter</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d237783e92">Considerations</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">Legacy URL</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">Can be either a relative URL (only path without host name) or an absolute
            URL (host name and path specified). Supports '**' as prefix or postfix
            wildcards and the query string ignore wildcard '?**'.</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">Optional 'i' parameter</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">Indicates a case insensitive match.</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;protocol&gt; and &lt;host&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">If unspecified, the respective values of the request are used.</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;pipeline&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">Indicates the dynamic pipeline.</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;unit&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">
            <p>Folders are named in the catalog/library/organization structure. The
              <em>&lt;unit&gt;</em> URL parameter refers to one of these folders in the file system.
            </p>
            <ul>
              <li>A catalog (for all category and product images)</li>

              <li>A content library (for all images used on content assets)</li>

              <li>The organization (for all other resources, for example promotion
                images)</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;locale&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">If unspecified, the default locale is used.</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;parameter name&gt;,&lt;parameter value&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">Used with a dynamic pipeline call. If &lt;parameter name&gt; or
            &lt;parameter value&gt; contains whitespaces, enclose them in double quotes ("
            "). Don't use single quotes(' ').</td>

        </tr>
        <tr class="">
          <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e89 ">&lt;path&gt;</td>

          <td data-label="Considerations" class="slds-cell-wrap" style="vertical-align:top;" headers="d237783e92 ">Used with a static resource.</td>

        </tr>
      </tbody>
    </table>

Use the following variables in the path or as parameter value:

 
| Variable | Description |
| --- | --- |
| {\_url} | The entire original URL |
| {\_path} | The path portion of the original URL |
| {\_host} | The host names used |
| {\_querystring} | The query string of the original URL |
| {<name>} | Parameter from the original URL |

Example of mapping

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Pattern</td>

          <td class="slds-cell-wrap" style="vertical-align:top;">Template</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>http://example.com/image/logo.gif</code></pre>
          </td>

          <td class="slds-cell-wrap" style="vertical-align:top;">
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>s,,,,,/content/images/test/logo.gif</code></pre>
          </td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Old URL</td>

          <td class="slds-cell-wrap" style="vertical-align:top;">New URL</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>http://example.com/image/logo.gif</code></pre>
          </td>

          <td class="slds-cell-wrap" style="vertical-align:top;">
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>http://example.com/on/demandware.status/WFS/​&lt;site&gt;/&lt;unit&gt;//content/images/test/logo.gif</code></pre>
          </td>

        </tr>
      </tbody>
    </table>

## Examples

Dynamic pipeline calls

This maps a legacy `press` page to a new `press` page.

```
http://www.yourhost.com./pressuk i p, https,,,en_GB,Link-Page,cid,PRESS
```

This maps a legacy catalog location to a new catalog location.

```
/jump/to/catalog p,,,Link-Category,,cgid,K,name,K
```

This maps the contents of a category from an old store with an absolute URL reference to a new catalog location.

```
http://www.oldstore.com/my/old/category/** p,,,Link-Category,,cgid,C,name,C
```

This maps the contents of a category from an old store with a relative URL reference to a new catalog location.

```
**/catalog/shoes?** p,,,Link-Category,,cgid,S,name,S
```

This maps a specific URL to a new catalog location.

```
/summerspecials p,,,Link-Category,,cgif,SummerSpecials
```

Static Resources

This maps one static page to another on the same website:

```
/aboutus s,,,,,/html/about_us.html 
```

This maps a legacy image with an absolute URL to an image in a new location.

```
http://www.mystore.com/show/my/image s,,,,,/images/add_cart.gif
```

This maps a legacy image with a relative URL to an image in a new location.

```
**/product-big-image.gif s,,,,,/images/product_big_image.gif
```

## The <Unit> Parameter

B2C Commerce static resources are owned by:

- A catalog (for all category and product images)
- A content library (for all images used on content assets)
- The organization (for all other resources, for example promotion images)

In the file system of your B2C Commerce instance, you can see folders that are named like the catalog/library/organization. The <unit> URL parameter refers to one of those folders in the file system. To map to static resources contained in cartridges, use "-" as the unit name.

These are some examples of resource paths:

Catalog: Sites-apparel-catalog

```
/on/demandware.static/Sites-SiteGenesis-Site/Sitess-apparel-catalog/default/v1283800996326/images/large/10160_242.gif 
```

Content library: Sites-SiteGenesis-Library

```
/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1283800996326/images/homepage/homepage_bottom_left.gif
```

Organization: Sites

```
/on/demandware.static/Sites-Site/Sites/default/v1283800855701/images/standard_storeLocatorMens.gif
```

## Mapping URLs with Whitespace

If you want to redirect a URL that contains white space, surround the product or brand name that contains white space with double quotes

Example 1: Redirecting a Product Name with White Space

Static mapping:`"/Product Name" p,,,Product-Show,,pid,MyProductID`

Incoming URL: `www.mysite.com/Product Name`

Redirects to: `http://www.mysite.com/Sites-MySiteID-Site/default/Product-Show?pid=MyProductID`

Example 2: Redirecting a Brand Name with White Space

Static mapping: `"/mapping with whitespaces" p,,,Search-Show,,prefn1,brand,prefv1,"Brand Name"`

Incoming URL: `www.mysite.com/Brand Name`

Redirects to: `http://www.mysite.com/Sites-MySiteID-Site/default/Search-Show?prefn1=brand&prefv1=Hugo%20Boss`