Use this tab to configure locale mappings, character replacements, and search
refinement settings.
-
Select .
If you see the Search Support Preferences page instead of the
URL Rules page General tab, navigate to to enable the URL Rules
module.
-
Click the Settings tab.
-
In the Character Replacement Settings section, Salesforce recommends the following settings:
- Lower Case: Select this to convert all product names or other information in your
URL to be lower case. This prevents search engines from counting URLs with different
capitalizations as duplicate content. If you don't check this box, then different
capitalizations appear in the URL. This is only necessary if you have brands or
products with the same spelling, but different capitalization.
Note: Lower case setting
has no effect on Product ID (abc123 vs. ABC123).
-
White Space: Select a character to replace white
space in product names, brand names, or other text included in
your URL. For example, if you have a product called "super shorts"
with a syntax of [ category, [ category-path, [ attribute,
ID ], - ] ]
, then the default selection is the minus
symbol, as it's both brief and easily human readable. However, if
you have minus signs in product or brand names, you might want to
select one of the other options to replace blanks in your
URLs.
- Custom Replacements: Select this to activate custom
character replacement rules. If this box isn't selected, the
rules defined on the Character Replacement Rules page are
disabled.
-
Custom Replacement Rules: Click Edit Rules to
define URL character replacement rules. The URL Rules page
Character Replacement Settings tab opens.
Use the table
below to define URL character mappings. During URL generation, the
character on the left side of a mapping rule is replaced with the
characters on the right side of the mapping rule.
See URLs:
Substituting Reserved and Special
Characters.
Note: if this setting is disabled, all non-ASCII and reserved characters are encoded during URL
generation.
- Character Replacement for 'pageURL': Select this to
apply character replacement for URLs created with 'pageURL'
override. This is selected by default.
See Overriding Generated SEO
URLs.
-
In the Locale-Mapping section, select where you want the locale to appear in the
URL:
- None: The locale doesn't appear in
the URL.
- Hostname: The locale appears as part of the host name. You create top-level host
name aliases in the alias file. You define the host names and select a locale.
See Assigning a Hostname Alias.
- URL Parameter: The locale appears as a
URL parameter. You define both the name of the parameter and the
value of each locale.
The resulting URL looks like the
following:
http://mystore.com/s/mysite/home?lang=en_US
Specify
mappings between the locale name used in the URL and the actual
locale (for example, en -> default
).
- Path: The locale appears as part of
the URL path.
This enables you to specify mappings between
locale names you enter to be used in the URL and the locales
recognized by Salesforce B2C Commerce.
You can define one or two values
for the locale.
-
With one value, the resulting URL looks like the
following:
http://mystore.com/s/SiteGenesis/en/mens
-
With two values, you specify the first value, the '/'
character, and then the second value, for example,
de/DE,
which results in the
following:
http://mystore.com/s/SiteGenesis/de/DE/mens
Only
one backslash can be used.
Note: When using two values,
the locale mapping of the URL Parameter
type can't contain '/'.
These are the mapping rules:
- The mapping can be empty.
- The mapping segments can contain the characters 'a-z',
'A-Z', '-' and '_'.
- The mapping can contain one '/' with the restriction that
both segments can't be empty.
The locale for any incoming URL is determined as
follows:
- B2C Commerce finds the locale mapping for the first and
second URL elements.
- If no mapping exists, B2C Commerce finds the locale
mapping for the first element only.
- If no mapping exists, B2C Commerce finds the locale ID of
the first URL element.
- If no mapping exists, B2C Commerce uses
default.
Note: You must have defined your locales before using the Locale-mapping section. Locales are
defined in the Site Preferences > Locales module.
-
In the Search Refinement URL Settings section, use the following
settings to configure how you want search refinements to appear in
the URL (see the examples in the Creating category and product URLs
section below):
Using this example,
/brand/blue|black/new-arrivals/shoes
:
- The refinements segment delimiter is the
/
between black and
new.
- The refinements delimiter is the
/
between brand and blue.
- The refinements value delimiter is the
|
between blue and
black.
Configure these settings:
Note: The period (.) and plus(+) delimiters are not encoded. When either is used as a delimiter and
as white-space replacement, conflicts appear in the conflict monitor.
-
Click Apply to save your changes for each of the above
sections.
Example: Use the Path Setting
B2C Commerce determines the locale mapping for the path parameter using the
above-described process. For example, a merchant configures the locale
mapping to Path and creates the following
mappings:
Value |
Maps to... |
en_US |
default |
de/DE |
de_DE |
de |
de |
US/en |
en_US |
|
fr_CA |
Using these settings, B2C Commerce maps locales
with the steps as shown in the following table.
For this URL... |
Step |
Is there a mapping for... |
Is there a locale for... |
|
Locale |
www.mystore.com/en_US/mens... |
1 |
en_US/mens |
|
No |
|
|
2 |
en_US |
|
Yes |
default |
www.mystore.com/de/DE/... |
1 |
de/DE |
|
Yes |
de_DE |
www.mystore.com/US/en/... |
1 |
US/en |
|
Yes |
en_US |
www.mystore.com/de/mens... |
1 |
de/mens |
|
No |
|
|
2 |
de |
|
Yes |
de |
www.mystore.com/fr_CA/mens... |
1 |
fr_CA/mens |
|
No |
|
|
2 |
fr_CA |
|
No |
|
|
3 |
|
fr_CA |
Yes |
fr_CA |
www.mystore.com/ABCDE/mens... |
1 |
ABCDE/mens |
|
No |
|
|
2 |
ABCDE |
|
No |
|
|
3 |
|
ABCDE |
Yes |
default* |
* As in www.mystore.com/en_US/mens.
because
default
is the fall-back.