Standard Rule
Info: The URL Rewriter feature in Bloomreach Content requires a standard or premium license. Contact Bloomreach for licensing details.
Overview
A standard rule in the URL Rewriter provides three input fields and a checkbox:
- Description
- From
- To
- Type
Description
Use the Description field to specify the purpose of the rule. Enter a clear summary so that others can understand the rule's intent and locate it using search.
From
Enter the source URL to match for rewriting. The value must start with a / or be a fully qualified URL (beginning with http:// or https://). You can use wildcards:
*matches a single path segment.**matches multiple path segments.
Examples:
| URL | Explanation |
|---|---|
| /abc | Matches the URL /abc |
| /abc/* | Matches /abc/def but not /abc/def/ghi |
| /abc/** | Matches any URL that starts with /abc/ |
| http://www.example.com/abc/**/*.html | Matches any URL on www.example.com that starts with /abc/ and ends with .html |
To
Specify the target URL for the rewrite. Reference wildcards from the From field using $N, where N is the wildcard's position.
Examples:
| From field | To field | Explanation |
|---|---|---|
| /abc | /def | Rewrites /abc to /def |
| /abc/*.html | http://www.example.com/def/$1.html | Rewrites /abc/somedocument.html to http://www.example.com/def/somedocument.html |
Rule Type
Select the type of redirect to apply. The rule type determines the HTTP status code returned.
| Rule Type | HTTP status code | Explanation |
|---|---|---|
| temporary-redirect | 302 | Instructs browsers and search engines to treat the redirect as temporary. Clients continue to request the original URL. |
| permanent-redirect | 301 | Instructs browsers and search engines that the URL has permanently moved. Clients update their caches and request the new URL directly. |