We had an expert create a huge redirect file for Apache but it seems to have stopped working. I'm thinking that URL Alias (Path module) will probably take care of a lot of what we really need.

Here's the situation:
There was a site before Drupal. When the site was converted, they decide to leave the old site in place, but prefix its pages with "alpha." So one of these old pages would be http://www.example.com/alpha/about_us.shtml. The corresponding new page is http://www.example.com/who-we-are. Since there are so many pages, manually looking up the node number is very expensive. The Apache file gives me the translation from the old page URL to the new page URL, so it would be simple to load it into the path module table.

First question, will Path be able to handle resolving the old URL into the alias URL and onto the actual node?

Next problem: The search engines seem to still be indexing the old site even though it is not included in the site map, so we would like to actually return a 301 for the pages redirected from "alpha" (but not the Pathauto created aliases). I see the Path Redirect module and Global Redirect module. Unfortunately neither is documented, so I have nothing to use to help decide what to do. Additionally, the Path Redirect module's issue queue is really long and old -- not a good sign.

Can anyone recommend a module that will do what I need, or should I write my own?

Comments

mm167’s picture

let me rephase your issue ..

1. already have a 1-to-1 old to new url mapping table
2. when a use browse a old page, u want drupal to show the new page.
3. just for a short period of time

in this case, u may modify the drupal index.php
add a pre-check of the url before calling the menu_execute_active_handler();

good luck

nancydru’s picture

The URL for the old site is not the same as the new site. That is "alpha/page_about_somethng.shtml" may be more like "/sports-channel/much-ado-about-nothing" so it's not just as simple matter if stripping the "alpha." In addition, some of the pages don't translate at all and need to be redirected to the home page. I suspect that without an actual 301 going back to the search engines, "a short period of time" will stretch out a long time.

dave reid’s picture

Path redirect will be a great solution for this problem. As the project page says, it simply allows you to redirect from old urls to new urls using a configurable HTTP status code. If you enable the module, all you need to do is go to admin/build/path-redirect/add, and you will see the "Add Redirect" form. Your "from" page should be "alpha/abous_us.shtml" and your "to" path should be "who-we-are".

Also, yes, the path_redirect issue queue is a little long, but since I've taken over maintainership a couple months ago, it's down to only one page and most of the feature requests and bug reports are fringe cases or on for the Drupal 5 version, which I cannot provide support. The View issue queue is currently 22 pages long, the last dating back from over 2 years ago that are still open. But that doesn't mean that Views in automatically bad. Just saying an issue queue is "long" is kind of like judging a book by it's cover. :)

nancydru’s picture

Unfortunately, this site is D5. At the moment, conversion is not possible.

dave reid’s picture

The D5 version of path redirect is still quite stable. I'm just not including any feature requests in the 5.x version. And if there are any bugs, it's up to fellow users to be able to test and review patches before I'll commit them.