Skip to content

Commit bce1526

Browse files
authored
Merge pull request #1 from unic/feature/initial-version
Feature/initial version
2 parents f30e7ff + 7d9fd88 commit bce1526

File tree

673 files changed

+47104
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

673 files changed

+47104
-1
lines changed

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,68 @@
1-
# SitecoreUrlMapper2
1+
# Sitecore URL Mapper 2
2+
3+
Sitecore URL Mapper 2 is a Sitecore Module allowing Authors to define redirects within Sitecore. This module is the successor to our [original Url Mapper Module](https://github.com/unic/SitecoreUrlMapper).
4+
5+
## Features
6+
7+
### Support for Plain Sitecore and JSS Headless
8+
9+
The module fully supports JSS in integrated and headless mode. Of course, native Sitecore setups are also supported.
10+
11+
In order to support redirects in JSS, you will have to patch the following processor within the `<mvc.requestBegin>` pipeline:
12+
13+
```xml
14+
<processor patch:after="*[last()]" type="Unic.UrlMapper2.Pipelines.MvcRequestBegin.TryPerformRedirectJss, Unic.UrlMapper2" />
15+
```
16+
17+
### Support for Multi-Site setups
18+
19+
Redirects can be defined on Site or a Global level, allowing you to target only specific sites or all sites within your setup.
20+
21+
### Wildcard and Regex matching
22+
23+
Redirects can be defined with Regex patterns, allowing you to be even more specific about what should and should not be redirected.
24+
25+
For example, if you would like to have a "wildcard" matching, you can define the term as `^mytest`, which will result in all of the following requests being a match: `https://mysite.com/test`, `https://mysite.com/testing`, `https://mysite.com/test-redirect`.
26+
27+
### Bulk Import
28+
29+
A Sitecore PowerShell script is included allowing Authors to upload a CSV containing redirect definitions.
30+
31+
The csv format looks as follows: `Type;Name;Site;TargetSite;Permanent;Regex;Protocol;LanguageCode;Term;Target;Description`
32+
33+
|Column|Description|
34+
|---|---|
35+
|Type|Defines on what level the redirect should be created. The value can be either `global` or `site`|
36+
|Name|Item name of the redirect. This value will be used to determine what language versions belong to this item.|
37+
|Site|Sitecore Site name, used if the redirect type is set to `site`. The redirect will then be created within that sites redirect folder|
38+
|TargetSite|If you are creating cross-site links, or global links, this value determines in what site the item target item will be searched in. This value needs to be internal Sitecore site name|
39+
|Permanent|Defines if the redirect should be created as a permanent redirect. Set to `x` to enable permanent redirect|
40+
|Regex|Defines if the redirect should support regex patterns within the term field. Set to `x` to enable regex support|
41+
|Protocol|Used to set the `Protocol` field on the item. Can be either `http`, `https` or `any`|
42+
|LanguageCode|Determines the language version of the record to be created|
43+
|Term|Defines the term that should be matched|
44+
|Target|Defines the target of the redirect. This can be either an external URL (eg. `https://google.com`), or the path to an item. Please note that the path shall not include any language code or site name (if you are using virtual paths). Example: `/products/super-product`|
45+
|Description|An optional description of the redirect. This will be fed into the `Description` field on the created redirect item|
46+
47+
A set of example csv records can be found here: `be\etc\import\example-import-file.csv`
48+
49+
### Easy installation, prepared for Azure and Azure DevOps
50+
51+
The Module can be downloaded either from Github or the Sitecore Marketplace. The module is distributed as a standard Sitecore installation package and also as Sitecore Web Deploy package (scwdp), allowing it to be included into existing ARM templates or referenced through the out of the box Azure DevOps Web Deploy tasks.
52+
53+
### Support for SolR and Azure Search
54+
55+
URL Mapper is a ContentSearch driven module. It ships with pre-defined configurations and support for SolR and Azure Search.
56+
57+
### Extensibility
58+
59+
The module offers several extension points and the framework elements have been developed in a way that they can be easily overwritten and adapted for custom requirements.
60+
61+
## Pre-Requisites and limitations
62+
63+
- The Content Search Provider must be either SolR or Azure Search, Lucene is not supported.
64+
- The module assumes that Sitecore PowerShell extensions are available.
65+
66+
## Development
67+
68+
If you would like to extend the Module and set up a local development environment, please follow the steps described [over here](/be/docs/README.md).

be/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPOSE_PROJECT_NAME=urlmapper2

be/.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.csproj text=auto merge=union
7+
*.sln text=auto eol=crlf merge=union
8+
9+
## Sitecore specific settings ##
10+
# unset the text attribute and prevent git from normalizing serialized files
11+
*.item -text
12+
*.role -text
13+
14+
# Always use LF for linux scripts
15+
*.sh text eol=lf

0 commit comments

Comments
 (0)