skybrud / Skybrud.Umbraco.Redirects

Redirects manager for Umbraco.
https://packages.limbo.works/skybrud.umbraco.redirects/
MIT License
37 stars 41 forks source link

Research forced redirects #38

Open abjerner opened 5 years ago

abjerner commented 5 years ago

For a number of different reasons, it could make sense to support forced redirects - that is redirects that still works even when the server responds with something other than a 404 status code.

Forced redirects will however mean that the underlying HTTP module will have to look at all server responses, which could affect performance - so this needs to be done right.

ronaldbarendse commented 4 years ago

Do you have concrete examples when you'd want to force a redirect for existing content?

I would argue unpublishing the content would be a lot easier (and way more performant), especially if this package would detect adding a redirect for existing content and allow unpublishing that item (for that specific culture) when saving the redirect.

Otherwise, it should definitely live behind a setting, so you'd need to opt-in to this behaviour (as it could also result in redirect loops!).

abjerner commented 4 years ago

@ronaldbarendse yes, if this is added to the package, it definitely needs to be opt-in, and not something for all redirects.

I sometimes create these "idea" issues from talks I either had with my colleagues or with people from the Umbraco community. Mostly so I don't forget about it, but also so people can chip in, and I can see if it's something that needs to be prioritized.

I think we have had a handful of support cases from our clients asking why their redirect didn't work, turning out to be because they had an existing page or media with that URL. But we tell them how it works, and I don't think it has been a problem so far. But I don't really have any examples beyond that.

kmeilander commented 10 months ago

I came here to figure out if this package could do this (on Umbraco v12), so it would be a useful addition. We have content that is used on other pages so we can't unpublish the item (like a list view of children), but we want the actual page URL to redirect somewhere else.

I know the old 301 URL Tracker package on Umbraco 7/8? had this by checking a "Force Redirect" option when setting the redirect in Umbraco, but we also ran in to a number of issues around this functionality in that package (performance, cache not updating), so it is for sure something that needs to be done right.

We'll build in custom code to handle the logic in another way to get around this for our project, but this would be a nice feature to have in this package. In general, this has been a great package to use for Redirects on Umbraco 9+ sites.

Rockerby commented 10 months ago

We've had this problem today on an old v8 site. Our solution was to just local import the project and remove the check on https://github.com/skybrud/Skybrud.Umbraco.Redirects/blob/v2.1.5/src/Skybrud.Umbraco.Redirects/Routing/RedirectsInjectedModule.cs#L62 and add some caching to the redirects lookup.

What I'll look to do is to split these into two separate PRs; one for cache and then another for a configuration change to allow users to force redirects to run regardless of the status code.

rpteasolutions commented 10 months ago

I have a client that misses this feature after we migrated them from v7 to v11. It would be nice with an opt-in checkbox as there is in UrlTracker for v7. By using this feature, we accept the performance issues there could be.

We hope there has been shown more interest for this from other sources too.

rpteasolutions commented 4 months ago

@abjerner Any updates regarding this idea?

rpteasolutions commented 3 weeks ago

Still hoping we can get this feature as an opt-in solution.