File system settings

See the official online handbook for more information about securing private files. The information about private files starts at the "Managing file locations and access" header.

Drupal provides configuration settings to control whether, and how, users and administrators can upload files for use by Drupal.

Specify 403 and 404 error pages

Drupal's page error messages are meant to be direct and to the point. If you want page error messages that are a little more user-friendly, Drupal allows you to customize them.

  1. Create two nodes, one for each kind of page error (403 and 404).
  2. Determine the ID number of the node you wish to redirect users to. One way to determine the node's ID number is to visit the node and look at the number after the last slash in your browser's address bar. This is your node's ID number.
  3. Now enter the paths to your nodes in the appropriate boxes on your error reporting settings page. For example, if the node ID number for 403 error codes is "83," you would type "node/83" into the "Default 403 (access denied) page" setting.
    • Drupal 6 mysite.com/admin/settings/error-reporting
    • Drupal 7 mysite.com/admin/config/system/site-information

Because you are creating nodes, they will show up in the tracker and popular content blocks and anywhere else real nodes would be display. If this isn't acceptable, there is a contributed module called Custom Error that avoids this problem.

Disabling clean URLs

It's possible that a Drupal site that was once configured to run with clean URLs later on stops doing so. After that, almost all content is inaccessible, because the paths being generated are not supported by the hosting platform.

This occasionally happens

Share a single database across multiple sites

Drupal 6 and later supports sharing a database with other web applications with the table prefix, also known as $db_prefix from settings.php.

The table prefix is defined in your Drupal site's settings.php file, and when it is present Drupal will place the prefix before each table name in the database. So if the table prefix were 'mysite_' then Drupal would look for tables named 'mysite_access', 'mysite_actions', and so on (instead of the default tables names 'access', 'actions', etc.) This allows more than one Drupal site, or even Drupal and other products, to share the same database, because the table names will not collide with one another. You can have another Drupal instance with table prefix 'mysite2_' sharing the database with 'mysite_' and indeed many other instances as long as each one has a unique table prefix.

If your hosting company only provides you with one database, then sharing it between multiple Drupal sites with table prefixes can be a cost effective alternative to paying for extra databases!

Site Building Guide

This is the customization guide and 'how to' guide for implementing business functionality and features into your Drupal site.

Pages

Subscribe with RSS Subscribe to RSS - Site administrators