Pedro Posada | Path redirect wildcard patch for path_redirect module

Path redirect wildcard patch for path_redirect module

Posted on July 22, 2009 - 5:24pm
<< 16 of 54 >>

In order to make the path_redirect module handle redirections with wildcards, I created a patch for it. There wasn't a simple way to do wildcard redirections through the .htaccess file. Some times is important to make a wildcard drupal redirects.

The way wildcards work:
When you want to redirect a path like "/about/" to "/" then any path based in about will be redirected to "/" like "/about/something/" or "about/anything" will be redirected to "/".

Patched module is in the attachment. The attachment contains all the module files already patched.

Files patched:
path_redirect.intall
path_redirect.module
path_redirect.admin.inc

You need to run the updates.php script after upgrading the module.

The patch was made for version:

<?php
// $Id: path_redirect.module,v 1.3.2.7.2.49 2009/06/27 21:57:20 davereid Exp$
?>

AttachmentSize
path_redirect_wildcard.zip42.44 KB
Submitted by Anonymous (not verified) on September 22, 2009 - 11:44pm.

How do you use this? I've tried adding <*> as a wildcard, but get the error "The redirect to path does not appear valid."

Submitted by pedro on September 23, 2009 - 12:32am.

Just follow the instructions on the attached file.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.