[support] Preserving old urls after migration

Walt Daniels wdlists at gmail.com
Fri Jan 7 21:46:35 UTC 2011


We have pursued an incremental migration policy. So all the old content is
still available but as we have new content we 301 it to the new location.
The 301s can be done in .htaccess but if you have many of them it becomes a
maintenance nightmare. So for instance we rename index.html as index1.html
and create a new index.html thusly:
<?php
// Permanent redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.nynjtc.org/");
exit();
?>
Of course php code in an html file is not interpreted unless you add one
line to your .htaccess file right at the top:
# Run php inside html files
AddType application/x-httpd-php .html
-------------
So anybody who tries to get to the old site instead winds up on the new
site. And the new site has a link to index1.html so that it can get to the
old site.

To try this go to www.nynjtc.org and click on Home Old TC Site at the bottom
of the left navigation menu. You will get to a highly modified old home page
as most of the links there just take you to the right new place. It has
taken us over a year to migrate useful stuff to the new site. Meanwhile
Google still finds lots of the old stuff.


On Fri, Jan 7, 2011 at 3:03 PM, Greg Knaddison <
Greg at growingventuresolutions.com> wrote:

> Drupal's path alias system doesn't work with urls with ? in them.
>
> I believe you can create redirects in your .htaccess file that can handle
> that.
>
> Regards,
> Greg
>
> --
> Greg Knaddison | 720-310-5623 | http://growingventuresolutions.com
> Mastering Drupal | http://www.masteringdrupal.com
>
>
>
>
> On Fri, Jan 7, 2011 at 11:44 AM, Mutuku Ndeti <jnmutuku at gmail.com> wrote:
> > Hi All,
> >
> > Hope you are having fun/Had fun in your drupal 7 launch
> >
> > I tried adding an aliases(the content I am migration is not that much).
> the
> > non drupal site urls are in the form
> > http://www.mydomain.com/item.php?artcat=Personal%20Finance&artid=71(sameas
> > external links from other sites)
> >
> > When I manually add an aliase (item.php?artcat=Personal
> Finance&artid=72).
> > I get error "page not found"
> >
> > Will this work?
> >
> >
> > --
> > [ Drupal support list | http://lists.drupal.org/ ]
> >
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110107/e04b9437/attachment.html 


More information about the support mailing list