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

Status:Needs review» Needs work

There 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.

Status:Needs work» Needs review

Formatting issues found by the automated review have been fixed.

Hi,

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.

PHP 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.

Status:Needs review» Closed (won't fix)

Hi biff45452!
We have next problem:

Duplication
This sounds like a feature that should live in the existing 'Redirect' (https://drupal.org/project/redirect) project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the 'Redirect' (https://drupal.org/project/redirect) issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to "needs review".

Kind regards

Status:Closed (won't fix)» Needs review

From 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:

  • Unlike the redirect module it is designed to do many to one redirecting where one to one redirecting would be better suited to the redirect module.
  • It is designed around the pattern matching provided by drupal_match_path giving it functionality like block visibility. This is alias based where the redirect module focuses on internal paths.
  • Wildcard matching (As was mentioned in my previous comment wildcard matching has been in the issue queue for years on the redirect module).
  • Content can override the redirect: I can make a blanket redirect for "blog/*" and then specify that only 404 pages should redirect.

Status:Needs review» Reviewed & tested by the community

Awesome, 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.

Status:Reviewed & tested by the community» Fixed

Thanks 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.

Quick 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.

It 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.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.