Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module provides redirecting based on path patterns with wildcards. This functions much like how block page visibility works. You specify a pattern like "old-blog/*" and a target like "new-blog" and all pages under old-blog will be redirected to new-blog.
Features
- Pattern matching allowing wildcard redirects
- Redirect code choice (301, 302, etc)
- Filters out existing pages so they won't be redirected (unless overridden)
- Loop protection (no chaining redirects allowed)
Project Page
https://drupal.org/sandbox/biff45452/2071259
Git
git clone http://git.drupal.org/sandbox/biff45452/2071259.git match_redirect
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxbiff454522071259git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
biff45452 CreditAttribution: biff45452 commentedFormatting issues found by the automated review have been fixed.
Comment #3
valicHi,
Pareview don't show any errors.
Manual review:
Installed module on clean D7 module
redirection works, tried with several test links (with and without wildcard).
Several similar PHP errors appears:
Undefined property: stdClass::$override in match_redirect_add_form() (line 182 of C:\xampp\htdocs\drupal17\sites\all\modules\match_redirect\match_redirect.admin.inc).
This module seems as great idea, but Drupal have also existing Redirect module,
from my perspective (as Drupal admin), it's better to contribute this features to Redirect module?
Only features which Redirect module lack is what your provide with this module.
Comment #4
biff45452 CreditAttribution: biff45452 commentedPHP errors are fixed.
The redirect module does not do any wildcard matching, it is strictly 1 to 1. Although both modules redirect they do so in a very different manner. There has been an effort to add wildcards to the redirect module (https://drupal.org/node/963668) for years and even with that effort it would still be different as my module allows multiple paths to redirect to one target.
Comment #5
tibezh CreditAttribution: tibezh commentedHi biff45452!
We have next problem:
If that fails for whatever reason please get back to us and set this back to "needs review".
Kind regards
Comment #6
biff45452 CreditAttribution: biff45452 commentedFrom the documentation:
"Module duplication (lower priority) makes it hard to find the right module, which is a real problem on drupal.org, and continues to grow. Again, to ensure that the code on drupal.org is useful to the community of people using Drupal, it is important to ensure that module duplication is avoided. However, duplication is different from similarity. A similar project that explains how it is different is helpful to the growth of our project."
This module is similar to redirect but it is not a duplicate, here's why:
Comment #7
bluesomewhere CreditAttribution: bluesomewhere commentedAwesome, this is very useful and well made. I agree that this should be part of Redirect, but I reviewed the issue thread there and davereid insists on more complex functionality living in separate modules.
Passed automated review with flying colors, a manual inspection looks good, and I confirmed the module working -- like a charm.
Thanks for your effort! I know I'll end up using this module.
Comment #8
kscheirerThanks for addressing the duplication issue. It does seem like something that belongs in Redirect or in a .htaccess file, but as noted in that issue, Redirect doesn't want it and .htaccess is not an option for some people. The code in this module looks solid.
Thanks for your contribution, biff45452!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #9
aubjr_drupal CreditAttribution: aubjr_drupal commentedQuick question for the creator: Can both Redirect and this module be used at the same time? At first glance it seems like these would clash?
Like others have posted, this wildcard feature is a must have for those who want to give a UI to non-programmers to be able to set these many-to-one relationships up (vs. manually coding them in settings.php or .htaccess). It's too bad Redirect can't do this out of the box already.
Comment #10
biff45452 CreditAttribution: biff45452 commentedIt does play nicely with the redirect module but there is no protection against creating redirects that clash (I may add this in the future). Both modules do provide protection against redirecting the admin pages so the potential for disaster is limited.