Question concerning drupal

rowan's picture

So I'm posting this in the hopes that Matthew or some other techno-savvy person might be able to help me. Also because I can't help but notice that barnson.org is drupal-powered.

I'm trying to set up a web site for my church. The idea is to have a public side, which is all html, that links to a private members-only side, which is run through a civicspace(aka drupal) portal.

Someone else has already set up the drupal portal, and I've designed the html, but right now the web address links to the drupal index, and I'm trying to figure out how to make it link to my index.html page instead. Placing the index.html page in the same folder as drupal's index.php doesn't work, and when I move or rename index.php, when I type in the URL it tells me I don't have permission to access the server anymore.

I'm hoping there's a way to solve this without having to re-install the drupal portal, because I've got even less clue on how to do that.

In other news.... mmmmm.... pie.... it's yummy because it's round...

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
matthew's picture

DirectoryIndex

Change your DirectoryIndex variable in the .htaccess file in the root of your web directory to "index.html" instead of "index.php".

The big downside though, is that you can't use "clean URLs" in that kind of setup. Like you can go to /node/reply/321 here, and on your site if you're using a static index.html page, you'll have to go to a index.php?q=node&...... type of a page. Clean URLs just makes life simpler for search engines to index your site for you. Without them, you tend to get skipped since most friendly engines don't like to post form data.

But anyway, be sure to disable the mod_rewrite rules for clean URLs so that you don't end up with weirdness.

--
Matthew P. Barnson

--
Matthew P. Barnson

rowan's picture

Next step

For starters, thanks so much for your advice, Matthew. I appreciate you taking the time. I disabled clean URLS in the admin section of my civicspace site, then set the DirectoryIndex variable in the .htaccess file to index.htm, like you said.

The URL of my site, when entered in the browser, now calls index.htm, so that's a huge step forward. From that page I link to index.php for my civicspace site, and that works fine too. However, any nav button I click on my civicspace site then sends me back to index.htm. After some testing, I think the problem is that somewhere it's configured to call the DirectoryIndex, expecting it to be index.php.

Any thoughts on how to tackle this one? Will moving all of the civicspace files into a seperate folder have the desired effect?

Arthur Rowan
Brother Katana of Reasoned Discussion
Rebel Leader and Dance Instructor for the Unitarian Jihad

-----------------------------
"You of all people should know that plastic surgery can do wonders." --Amber Fitzgerald
"And you're living proof that mistakes are sometimes made." -- Charisma Weaver
[a hlink="htpp://buffydc.com"]DC After Dark[/a]

Arth

matthew's picture

Post...

Post your existing .htaccess file as a comment here. I'll post you a fixed one :)

--
Matthew P. Barnson

--
Matthew P. Barnson

matthew's picture

Reply to original post...

Make sure you reply to your own original post with the .htaccess file, otherwise the formatting makes it really long and narrow...

--
Matthew P. Barnson

--
Matthew P. Barnson

rowan's picture

# # Apache/PHP/site

#
# Apache/PHP/site settings:
#

# Protect files and directories from prying eyes:

order deny,allow
deny from all

# Set some options
Options -Indexes
Options +FollowSymLinks

# Customized server error messages:
ErrorDocument 404 /index.php

# Set the default handler to index.php:
DirectoryIndex index.htm

# Overload PHP variables:

# If you are using Apache 2, you have to use
# instead of .
php_value register_globals 0
php_value track_vars 1
php_value short_open_tag 1
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value arg_separator.output "&"
php_value session.cache_expire 200000
php_value session.gc_maxlifetime 200000
php_value session.cookie_lifetime 2000000
php_value session.auto_start 0
php_value session.save_handler user
php_value session.cache_limiter none
php_value allow_call_time_pass_reference On
php_value memory_limit 24M

# Various rewrite rules

RewriteEngine on

# Modify the RewriteBase if you are using Drupal in a subdirectory and the
# rewrite rules are not working properly:
#RewriteBase /drupal

# Rewrite old-style URLS of the form 'node.php?id=x':
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]

# Rewrite old-style URLs of the form 'module.php?mod=x':
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]

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

# $Id: .htaccess,v 1.58 2004/10/09 20:41:49 dries Exp $

-----------------------------
"You of all people should know that plastic surgery can do wonders." --Amber Fitzgerald
"And you're living proof that mistakes are sometimes made." -- Charisma Weaver
[a hlink="htpp://buffydc.com"]DC After Dark[/a]

Arth

matthew's picture

Looks like...

Two things:

1. From your .htaccess, I can tell you're running an ancient version of Drupal. You must upgrade to the most recent version.
2. You're still rewriting everything, even though you've turned clean URL's off. Comment out the last three lines: RewriteCond, RewriteCond, and RewriteRule. Here's what they are doing:

  • Is the URI a file? If it is, don't change what you're sending.
  • Is the URI a directory? If it is, don't change what you're sending.
  • If the previous two checks failed, then rewrite every request (".*") to "index.php?q=(".*")". This means that, since you turned off clean URLs, every request to your Drupal is getting rewritten, so if you request "index.php?q=node&nid=1", the web server rewrites it to "index.php?q=index.php?q=node&nid=1", which it can't understand and will barf on.
  • Since your ErrorDocument for "File Not Found" (404) is set to "/index.php", it won't even tell you that the file isn't found. It will just display your front page again -- seeming to do nothing, as far as your browser is concerned. This has been fixed in newer versions of Drupal, which is another reason I can tell you're running a really old version. It actually looks like you're using an old .htaccess from an even older version of Drupal with a somewhat newer version. I can understand how that could easily happen with an in-place upgrade; I've nearly done it several times myself.

Then try again after you've put pound signs "#" in front of those three lines. Should fix it. The next thing you have to do is backup your MySQL database:

mysqldump --all-databases -u root -p > mysql_backup.mysql

Copy the file "mysql_backup.mysql" somewhere safe, then proceed with your upgrade. You should be able to restore from your backup easily. Alternately, you can specify "MY_DATABASE" (your database name) rather than "--all-databases" if you only want to back up that one db.

Let me know if you need more help; if it's an Internet-exposed web site, I'd be happy to fix you up. I've done upgrades several dozen times.

--
Matthew P. Barnson

--
Matthew P. Barnson

Timpane's picture

Woah..

Dude.. Matt's an (ex)actor and musician..
Dude.. Rowan is an actor and Musician..

WTF ARE YOU GUYS TALKING ABOUT??!!!
I can't even read anymore..
*(&$^#

NVZ: NINJAS VS ZOMBIES - THE MOVIE - www.nvzmovie.com
THE OFFICIAL JUSTIN TIMPANE WEBSITE - www.timpane.com

weed's picture

If Everyone could read it

They wouldn't call it code.

You're reading the working which allows you to post to this website. It's like waiting for a patients CBCs to come back to determine a course of action, or putting in a SWAN, or any of your medical jargin my wife has been telling me about for the past five years.

My $.02
Weed

My $.02
Weed

Timpane's picture

MedSpeak

Ok, guilty.

The other day I came home and told my wife about a Biliary Duct Brush Biopsy, and she said "A Billy Bob Duck Proxy?"

NVZ: NINJAS VS ZOMBIES - THE MOVIE - www.nvzmovie.com
THE OFFICIAL JUSTIN TIMPANE WEBSITE - www.timpane.com

rowan's picture

Finally got around to

Finally got around to working on this again... I'm re-installing drupal in a seperate directory today, and hopefully that should fix the communication problem.

I wanted to express my gratefulness for helping out on this, Matt. Both I and the church I'm designing this for say thank you very much.

Arthur Rowan
Brother Katana of Reasoned Discussion
Rebel Leader and Dance Instructor for the Unitarian Jihad

-----------------------------
"You of all people should know that plastic surgery can do wonders." --Amber Fitzgerald
"And you're living proof that mistakes are sometimes made." -- Charisma Weaver
[a hlink="htpp://buffydc.com"]DC After Dark[/a]

Arth

matthew's picture

You're welcome...

You're welcome, and good luck. There's a worm running around in the wild right now exploiting unpatched Drupal installations and then sending massive quantities of spam using a faked Paypal page to attempt to phish people's identities.

One thing about the Internet... it certainly causes the scum to rise to the surface in anonymity in a way people tend to avoid in real life.

--
Matthew P. Barnson

--
Matthew P. Barnson