Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Drupal and Tiger's blojsom

I originally posted this in the webserver area, but maybe this is a more appropriate place for it....

I have been running one Drupal based site for 6 months or so off of a folder adjacent to the default web document root. A week or so ago I migrated our main web page, which lives in the default location, to Drupal as well. I just put the drupal files into the web root folder, leaving the /webmail, /weblog, and /webobjects folder in place. I have clean urls enabled.

So, squirrelmail continues to work as before but the built-in blojsom installation is having issues. I can still get to the initial page (../weblog), but if I try to go to a blog, ie (../weblog/ username) Drupal captures that request and gives a page not found error.

Any ideas on what to try to resolve this? I know that drupal has it's own blogging system, but we use blojsom for an internal blog and the integration with tiger server's directory server is helpful. Thanks.

PowerBook G4 1.67, Mac OS X (10.4.9)

Posted on Jun 6, 2007 9:55 PM

Reply
2 replies

Jun 7, 2007 12:02 AM in response to Austin Sloat

okay, I figured this out. The issue is with the .htaccess file that drupal uses and probably only figures in when having clean urls enabled.

So, the basic rewrite in .htaccess is

# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

This tests whether the requested filename (your url) is a real (f)ile or (d)irectory and by virtue of the "!" condition it does not apply the rewrite rule if there is a valid file or directory requested.

The blojsom folder is a real location (/weblog) so the rewrite rule doesn't apply and the url is reachable. The url (/weblog/ username) is not an actual path in the directory structure but is generated by blojsom so the rewrite rule was being applied.

To get around this add the following directive before the rewrite rule

RewriteCond %{REQUEST_URI} !weblog/*

This checks the requesting url and doesn't apply any rewrite rules to any urls that start with weblog from the base url.

Drupal and Tiger's blojsom

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.