Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

What would the best way to setup previous site urls to new Drupal site.

share|improve this question
    
Shouldn't this rather be moved to drupal.stackexchange.com ? –  EricSchaefer Apr 19 '11 at 16:12
add comment

migrated from stackoverflow.com Feb 24 '11 at 8:25

This question came from our site for professional and enthusiast programmers.

2 Answers

You want the path module.

If your old site followed a fixed scheme and you have a lot of urls, you might also be able to leverage pathauto.

share|improve this answer
add comment

The best way is to write your own import module which uses path_set_alias() to assure that the url of the page on the new site is the same as that on the old site. You can use Drupal's batch operations API to do this for you. This gives you more flexibility than simply using pathauto.

If you aren't able to do this, try to approximate your old site's urls with pathauto. Note that when you import, the paths probably won't be set with pathauto - you will need to go to the pathauto interface in order to generate these url aliases (they are called url aliases, since Drupal itself makes urls in a different way - but allows you to add url's to a page by means of these aliases).

If you're doing this for SEO reasons, you'll also want to find a way to add the canonical metatag for pages which aren't aliased, to prevent yourself from getting a duplicate content penalty. Implementing this will probably vary, depending on whether you're using Drupal 6 or 7. It seems that the nodewords module has this functionality for D6 - just a suggestion, as I haven't used it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.