Support » How-To and Troubleshooting » 301 redirect of Drupal links to WordPress

301 redirect of Drupal links to WordPress

  • Hi everyone,

    I’m having trouble getting 301 redirects to work as I’d like for pages from an old Drupal site into corresponding new pages on WordPress. Does anyone have any advice on this please?

    This code works…

    RewriteRule ^?q=node/(.*) http://www.website.com/?p=$1 [R=301,L]

    …but I’ve hit a stumbling block because I need the URLs to be like this in the end…

    RewriteRule ^?q=node/2 http://www.website.com/search-friendly-url/ [R=301,L]


Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi jcpenrose83,

    do you have a lot of pages? Also, are you using the same domain? If there aren’t many pages I would do the redirects one by one in a .htaccess file using the below code.

    Redirect permanent /one http://example.com/two

    Hi Johnb81,

    There’s about 25 pages so happy to do them manually, but doing 301’s like that the query element of the Drupal URL is kept by WordPress so it looks messy using…

    Redirect permanent http://www.oldwebsite.com/?q=node/2 http://www.newwebsite.com/search-engine-friendly-url/

    …shows this in the address bar:


    …when I want:


    Moderator Mark Ratledge


    Forum Moderator

    The remaining query string is a result of a problem with your 301 directive in .htaccess.

    Try WordPress › Redirection « WordPress Plugins. It allows all manner of redirects and 404 logging. Import a CSV of your old URLs or enter them by hand.

    Google search with the string site:http://mydomain.com to get a list of all your indexed URLs if the old Drupal site is still up.

    Thanks @songdogtech that’s solved it for me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘301 redirect of Drupal links to WordPress’ is closed to new replies.