Training

Our next U.S. stop:

Mike Anello and Andrew Riley from Mediacurrent are teaming up to offer the first Blue Collar Git workshop on Friday, June 8 as part of DrupalCamp Charlotte (also part of the Southeast LinuxFest). The cost is only $149 for the full day if you register during the month of May ($199 otherwise). 

New Podcast

Posted Wednesday, May 9 at 7:50 am
Brandon Morrison (Brandonian on drupal.org) joins Andrew Riley and Mike Anello on the first post-DrupalCon Denver edition of the podcast to talk about all things Geo in Drupal 7. Brandon is one of the maintainers of the GeoField module and is an active member of the Drupal Geo community.
Download Podcast 82
DrupalEasy_ep82_20120509.mp3
Syndicate content

Newsletter

Stay up-to-date on DrupalEasy workshops and other events. On average, we send about one newsletter per month.

Testimonial

Mike is a great teacher!

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