Core-Redirects is a CoreMedia extension for managing redirects from within CoreMedia Studio. The project is Apache-2.0 licensed, so it can be easily used and modified.
- Static redirects from an absolute URL or a regular expression
- Conditional redirects: redirect only, if:
- the original page returns a 404
- the source contains certain URL parameters
- Features can be activated for members of certain CoreMedia groups.
- Import of redirects from a CSV file
- Optimized caching in the CAE to minimize response times
- Configuration of redirects per site
Per default, requests can only be redirected to a CoreMedia content. Redirects to external URLs can be done in two ways:
- linking a document of the type
CMExternalLink
- using targetUrls for certain redirects, instead of linking contents. This should be used with care, because it might redirect to a non-existing page. The nice thing about linking contents is that the redirect target will exist as long as the redirect exists.
If you have any problems, questions, ideas, or feedback, please contact us or create an issue.
See the releases for tested compatibilities.
For earlier versions, take a look into these branches:
- CoreMedia CMS-9 (v18.10). See the branch:
1904.2-compatible
.
There is a simple user guide available.
Integrate the Code in your CoreMedia Blueprint Workspace either as a submodule or subtree with GIT. If you would rather like to copy and customize the code, use subtree and forget that you did.
git submodule add https://github.com/tallence/core-redirects.git modules/extensions/core-redirects
Subsequently, please follow the standard GIT procedures for the handling of submodules.
If additional repositories are no option for you, you can integrate a copy of the extension via the subtree command of GIT.
git subtree add --prefix modules/extensions/core-redirects git@github.com:tallence/core-redirects.git master
This way, you automatically get a separate branch of the remote repository within your workspace which you can customize to you needs.
Activate the extension using the respective CoreMedia Content Cloud activation scheme for the version in use, like e.g. the management tool for the latest releases:
mvn extensions:sync -Denable=core-redirects -f workspace-configuration/extensions/pom.xml
-
Change the
groupId
andversionId
of all pom.xml to your project values. -
The schema.xml (this link only works, if this code is within a blueprint workspace) of the content config-set must contain these two fields:
<field name="source" type="string" indexed="true" stored="true"/>
<field name="sourceUrlType" type="string" indexed="true" stored="true"/>
-
Redirects are stored in/read from a site-specific folder (
Options/Settings/Redirects
), to which users need to have permissions to edit and publish Redirect documents.
These options can be configured:
core.redirects.filter.keepParams
if enabled, the query parameters of the source URL will be appended to the redirect target URL.core.redirects.path
the site-relative path where the redirect-documents are storedcore.redirects.cache.parallel.site.recompute.threads
Maximum number of threads for complete site index updates. Will be used at CAE start up.core.redirects.cache.parallel.item.recompute.threads
Maximum number of threads for item (single redirect) updates. Will be used for changes in a running CAE.core.redirects.permissions.targetUrlGroup
The group, which allows members to describe a redirect target with a URL instead of a document. Should be used with care. Use "*" to allow this for editor.core.redirects.permissions.regexGroup
The group, which allows members to use the sourceType "regexp". Should be used with care.