is hook_shurly_redirect_after() in Drupal 10 version? Why not?

Created on 31 July 2024, 5 months ago
Updated 8 August 2024, 5 months ago

Problem/Motivation

Hi, at the homepage are hooks stated, like hook_shurly_redirect_after(): allows other modules to tap in and alter the redirection.

But how does this work?
Can I for every shorturl, alter it to another field on the same node?
So the shorturl from one node: node/1 is website/xyz
A field weburl in this node has the value www.website1.com
The shorturl from another node: node/2 is website/abc
The field weburl in this node has the value www.website2.com

Can I use hook_shurly_redirect_after to redirect website/xyz to www.website1.com and
website/abc to www.website2.com and redirect all my other nodes with this weburl field?
And what do I do when the weburl field is blank?

I do not see documentation how to use hook_shurly_redirect_after()
I see one page about hook_shurly_redirect_before(): https://drupal.stackexchange.com/questions/53339/drupal-shurly-before-re...

My specific case is stated here, on which I have a redirect problem: https://www.drupal.org/project/shurly/issues/3463869 🐛 page not found [date/time] / /[shurly short url] Active

This issue is a general question how to use hook_shurly_redirect_after() to redirect shorturls to specific field values in nodes.

Thanks for your reply in advance,

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇳🇱Netherlands Summit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024