Drupal 301 Redirect

June 29, 2008

in Drupal

Post image for Drupal 301 Redirect

This weekend while working on one of my drupal sites – yeah I’m new to it and still learning just how to manipulate this content management system.

I needed to find out how to do a 301 redirect, a quick search on google turned up quite a few search results. As I went through them, I really became frustrated most of the advice and examples had me doing a 301 redirect by typing in code into the .htaccess file.

While no stranger to working with this file I could just not get the examples to work as desired. Other methods suggested creating 301 redirects for drupal by creating individual 301 headers.

I really felt there just had to be a much easier way. After hours of frustration and still more searching, I found just what I was looking for even though it was still in the development stage for Drupal 6.

The module is called Path Redirect twenty minutes later I was in business, task completed. Hopefully you’ll find this post and it will provide the answer your looking for.

No related posts.


{ 7 comments… read them below or add one }

Anonymous July 1, 2008 at 10:31 pm

i am a serious noob but could you explain or direct me to a very direct explaination of how to install a module?

This Path redirect looks like what I need.

Phil
philmiller278 @ gmail . com

Reply

Glenn July 3, 2008 at 11:40 am

Installing a module is just a matter of uploading the it to the modules folder. Then activating the module found under > Site Building > Modules. You want to make sure that you get the version that is right for your version of Drupal.

I am still learning just how to work within this CMS version with a lot of trial and error along the way. Still I like what I’m finding.

The 301 redirect was needed for another site that I’ve built and really wanted to change the linking structure to both make it shorter and more eye appealing as well.

The challenge in finding the information is in asking the search engines the right questions. But expect to find generally older information that no longer may apply.

Reply

Anonymous December 10, 2008 at 1:17 am

Why not use Domain redirect from Cpanel? That’s much simpler.

Reply

Glenn December 10, 2008 at 7:18 am

That would be another option if you where using Cpanel. With a module it does not matter what hosting platform your using.

Reply

kenji July 6, 2009 at 10:27 am

PHP code does not work when your node or page has been cached by Drupal. When the page has been cached it is not able to run the php code anymore.

Reply

jlx November 3, 2009 at 12:42 am

Well, what actually gets cached in this case is an HTTP response with the redirect, so I don’t see that as a problem here..

Reply

Business Web Coach January 17, 2010 at 9:19 am

I was wondering how to handle all of the 301s because I am migrating a very old site to Drupal, and there are going to be a vast number of URL changes.

It looks like the Path Redirect module is still in beta, so I’m still not sure if I’m going to use it just yet.

BTW – This is an awesome source of Drupal info, I’m subscribing to your feed.

Reply

Leave a Comment

Previous post:

Next post: