Download & Extend

Domain Swap as Redirect

Project:CustomError
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi there,

We're going to be slapping a Drupal site on a domain that formerly had a traditional file system on it (i.e. http://www.oursite.com/documents/mydoc.docx pointed to a mydoc.docx file in a real documents folder in the web rot). In order to upgrade our site to drupal and to keep all sorts of links from breaking, we'd like drupal to redirect users from http://www.oursite.com/documents/mydoc.docx to http://old.oursite.com/documents/mydoc.docx or somethng like it.

Essentially, we want to swap domains with urls that return 404 on drupal to another domain, where our old site will still be up and running. With customerror the redirects take a regexp for the source, but any url that matches the regexp redirects to a single destination. We have thousands of files under the old site...so we'd have to make a line in the redirects text box for each of them yes?

Anyway, I took apart your module and remixed it to create a custom one for our purposes that did the domain swapping. I wanted to let you know I've done it and offer the idea as a feature in the future. I'd be happy to help out if you wanted to add it. The source of our module is attached.

Cheers,
Mike

AttachmentSize
domain_swap_404.zip1.74 KB