When porting a static HTML site to a Drupal site, you often encounter this problem:
For the legacy site, it has a link:
http://www.example-legacy.com/path/to/directory/index.html and you do not want to change this link; and its Apache configure file declares that
DirectoryIndex index.html, index.php.
On the new new Drupal site, you create a node with nid = 100 and duplicate the content of
http://www.example-legacy.com/path/to/directory/index.html. Thanks to Path module and Clean URL feature, you can set
http://www.example-drupal.com/node/100's URL path as
By doing this, you guarantee that a visit to
http://www.example-drupal.com/path/to/directory/index.html gets the same content as
So far, so good.
But what if your visitors go to
http://www.example-drupal.com/path/to/directory? Unfortunately, as they are visiting a path alias, not a physical path, they will not be able to get
http://www.example-drupal.com/path/to/directory/index.html automatically, even on the new Drupal site's Apache configure file, it also declares that
DirectoryIndex index.html, index.php, as it only works for physical directory.
Worse more, in many cases,
http://www.example-legacy.com/path/to/directory instead of
http://www.example-legacy.com/path/to/directory/index.html is provided to visitors.
Therefore, after porting the site, we must make sure that a visit to
http://www.example-drupal.com/path/to/directory must be able to locate
DirectoryIndex files declared by the legacy site.
For example, if a legacy site declares that
DirectoryIndex index.html, index.php, then for visits to
http://www.example-drupal.com/path/to/directory, Drupal must first look for
http://www.example-drupal.com/path/to/directory/index.html, and if not found, try
http://www.example-drupal.com/path/to/directory/index.php again. If still not found, gives 404 Page Not Found error.
Sometimes, for somehow, we want to redirect all 404 visits to another website. For example, if
http://www.example-drupal.com/path/to/directory/index.php is not found, we want to redirect visits to
http://www.example-legacy.com/path/to/directory/index.php to see if this URL exists.
About this module
This module is developed to fix aforementioned problem. You can tell the module what string (file name) is to be appended to the end of a path if given path is not found.
For example, given path is
http://www.example-drupal.com/some/directory and legacy site declares that
DirectoryIndex welcome.htm, index.html. If
http://www.example-drupal.com/some/directory does not exist, the module will try to find URL path
www.example-drupal.com/some/directory/index.html respectively. If both fails, and if an external site
www.example-legacy.com/archive is specified, this module will redirect visits to
www.example-legacy.com/archive/some/directory to see if it exists.
- Maintenance status: Unknown
- Development status: Unknown
- Downloads: 786
- Last modified: November 27, 2014