Pubcookie and Drupal Non-Integration
January 5, 2010 by limako
I couldn't find this documented anywhere, so I'm documenting it here.
We have Drupal installed in the root of the webserver, but I wanted to have a subdirectory with Pubcookie authentication (completely separate from Drupal), but I couldn't get it to work. I would get sent to a non-existent URL /Pubcookie.reply rather than redirected back to where I wanted to go.
I tried setting the PubcookiePostURL to where I wanted it to go. That sort of worked -- I could load that page -- but when I tried to use that page as a form, I would get a cryptic error message about "No granting reply" that was obviously some kind of Apache error, but with no corresponding entries in error_log.
Maybe this is supremely obvious to others, but I spent an hour or two this morning trying to figure out what the problem was. Now it seems obvious: Pubcookie.reply is a magic URL that Apache knows how to reply to, but Drupal was rewriting it to index.php?q=Pubcookie.reply or something stupid like that. So I just added in another rewrite rule, modeled on and just after the Favicon.ico entry in .htaccess like this:
RewriteCond %{REQUEST_URI} !=/PubCookie.reply
Now it works just fine.
Hopefully this post will show up if anyone else gets stuck like I was.
- limako's blog
- Login to post comments


Recent comments
13 weeks 1 day ago
14 weeks 1 day ago
27 weeks 3 days ago
34 weeks 6 days ago
38 weeks 3 days ago
38 weeks 3 days ago
44 weeks 7 hours ago
45 weeks 1 day ago
45 weeks 5 days ago
45 weeks 6 days ago