Regex Does Not Work (UrlTracker.3.13.1 / Umbraco 7)
Hi all,
This is a fantastic package - very useful to be able to give content editors ability to add and edit redirects in Umbraco. Today I discovered a feature that doesn't work (using the latest Umbracos)
Investigation tells me it's possible this feature may have worked in the past, it could even be internal changes to Umbraco itself over the last year which may have stopped this working. It may also be possible, with some configuration tweaks or changes to Umbraco itself, to get the working.
(I would expect this to redirect /blog-articles/my-first-article to /blog/my-first-article )
N.B. I also tried this with and without escaping the slashes:
Regex: ^/blog-articles/(.*)
Typically in most regex implementations, both will usually work, even though slashes are recommended to be escaped.
When I realised something was not right I set a new regex rule to be:
Regex: /fred/*
and
Regex: ^/fred/*
(Bascially any url that contains /fred (and anything after) or any urls that start with fred (with anything, OR nothing following), and since neither of these simplest cases fire, I know that no regex will ever match in this system.
It's not a problem for now as I can easily use the UrlRewriting.config file - but it would be ace if this feature could be revived!
I think the caret (^) may actually be throwing it off here, I'm pretty sure it takes the domain into account from memory. I'd have to double check though...
Regex Does Not Work (UrlTracker.3.13.1 / Umbraco 7)
Hi all,
This is a fantastic package - very useful to be able to give content editors ability to add and edit redirects in Umbraco. Today I discovered a feature that doesn't work (using the latest Umbracos)
Investigation tells me it's possible this feature may have worked in the past, it could even be internal changes to Umbraco itself over the last year which may have stopped this working. It may also be possible, with some configuration tweaks or changes to Umbraco itself, to get the working.
As noted by another user in a separate thread also regarding Regex not working as expected https://our.umbraco.org/projects/developer-tools/301-url-tracker/version-2/48188-Regex-Redirects
But it's easy to reproduce by simply setting up the latest Umbraco and installing the latest Url Tracker (3.13.1)
Consider the following Regex expressions:
Regex: ^\/blog-articles\/(.*) Destination: /blog/$1
(I would expect this to redirect /blog-articles/my-first-article to /blog/my-first-article )
N.B. I also tried this with and without escaping the slashes: Regex: ^/blog-articles/(.*)
Typically in most regex implementations, both will usually work, even though slashes are recommended to be escaped.
When I realised something was not right I set a new regex rule to be:
Regex: /fred/* and Regex: ^/fred/*
(Bascially any url that contains /fred (and anything after) or any urls that start with fred (with anything, OR nothing following), and since neither of these simplest cases fire, I know that no regex will ever match in this system.
It's not a problem for now as I can easily use the UrlRewriting.config file - but it would be ace if this feature could be revived!
I've created a GitHub issue for this :) https://github.com/kipusoep/UrlTracker/issues/173
I think the caret (^) may actually be throwing it off here, I'm pretty sure it takes the domain into account from memory. I'd have to double check though...
Have you tried without?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.