New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Mike quickly spotted several flaws in our Drupal configuration and was able to teach us how to correct them. His training style and solid knowledge of Drupal makes for an efficient and productive training session. I came away with full confidence in the data I learned that day.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Help! I'm constantly redirected to my Home page!

Working on an old Drupal 5 site (I was upgrading core), I came across a very odd bug. Every time I submitted a form, I was being redirected to the frontpage of the site. I had recently installed Path Auto and Global Redirect, so I thought one of those could be causing the problem.

With Global Redirect on, when I tried to visit a normal URL with an alias, in this case, node/2 that was aliased to services, I was also getting redirected to the home page.

I know that in the .htaccess file for the site, I had made some edits years ago when we migrated the site from flat HTML files to Drupal, so I started snooping around in there. Nothing looked too out of place, but I decided to open up a fresh copy downloaded from Drupal.org (version 5.22 as of this writing). They were just different enough, that I decided to copy over the fresh rules.

All of my redirect problems disappeared. Now we have Global Redirect and Path Auto, both of which make the site more SEO-friendly, and submitting forms does not automatically send me to the home page of the site.

When in doubt, make sure you have not hacked core.

What was wrong? If I remember correctly, the Drupal .htaccess file has some bugs with certain versions of Apache. Apache's default behavior when it causes a syntax error in a config file is to throw an error of its own, and Drupal tends to interrupt many of Apache's errors with something else. I'm guessing that somewhere in between node/2 and services, Apache encountered an error, and Drupal core or Global Redirect sent us to <front>.

Also, a bonus Drupal performance tip I located during my search to debug this problem: Move your htaccess rules into the httpd.conf file to speed up your server.

Trackback URL for this post:

http://drupaleasy.com/trackback/371
No votes yet

More Quicktips


Syndicate content