I was recently doing a fairly routine security update on our website (www.pittsfieldtv.org/web), when I (as a novice administrator) broke several cardinal rules. I updated to our main site instead of a test site, and I accidentally nuked our .htaccess file, which I cannot locate the backup for. As a result, the site has become a bit of a mess, and being a neophyte, I would very much appreciate help pulling this one out of the fire.
Here are the issues I've discovered:
- First, and of note, the website is being hosted by 1&1 under the Business plan. It's an inexpensive option for this non-for-profit website, and it suits most of the site's needs. However, it does generate some complexities which may need to be accounted for.
- The site's home page works flawlessly - it looks exactly as I'd expect it to. This is the only thing that works as expected.
- When I click on a navigation link on the site itself, I see the following "Error 300:"
Multiple Choices
The document name you requested (/index.php) could not be found on this server. However, we found documents with names similar to the one you requested.
Available documents:/index.htm (common basename)
Please consider informing the owner of the referring page about the broken link.
- Whenever I click on an administrative link, I see the following error:
Warning: require_once(/homepages/31/d298152427/htdocs/includes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in /homepages/31/d298152427/htdocs/index.php on line 19
Fatal error: require_once() [function.require]: Failed opening required '/homepages/31/d298152427/htdocs/includes/bootstrap.inc' (include_path='.:/usr/lib/php5') in /homepages/31/d298152427/htdocs/index.php on line 19
- The following is the .htaccess I've tried to put together to fix the various issues...I don't know what (or even if) I am doing anything wrong here:
#
# Apache/PHP/Drupal settings:
#
AddType x-mapp-php5 .php# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes# Follow symbolic links in this directory.
Options +FollowSymLinks# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php# Force simple error message for requests for non-existent favicon.ico.
ErrorDocument 404 "The requested file favicon.ico was not found.
# Set the default handler.
DirectoryIndex index.php# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value memory_limit 32M# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value memory_limit 32M# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value memory_limit 32MAddType x-mapp-php5 .php
# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600# Do not cache dynamically generated pages.
ExpiresByType text/html A1# Various rewrite rules.
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /web
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /web# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $
I am completely at a loss. I've looked for help on these issues, and I can find nothing. I've lucked out that our community seems to have forgotten about this website during the holiday season, but I need this thing back online ASAP. Any help that anyone can offer would be greatly appreciated.