? 56634.diff Index: .htaccess =================================================================== RCS file: /cvs/drupal/drupal/.htaccess,v retrieving revision 1.70 diff -u -p -r1.70 .htaccess --- .htaccess 24 Mar 2006 18:00:27 -0000 1.70 +++ .htaccess 8 Apr 2006 08:37:47 -0000 @@ -51,6 +51,17 @@ DirectoryIndex index.php RewriteEngine on + # If your site can be accessed both with and without the prefix www. + # you can use one of the following settings to force user to use only one option: + # + # If you want the site to be accessed WITH the www. only, adapt and comment out the following: + # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC] + # RewriteRule .* http://www.example.com/ [L,R=301] + # + # If you want the site to be accessed only WITHOUT the www. , adapt and comment out the following: + # RewriteCond %{HTTP_HOST} !^example\.com$ [NC] + # RewriteRule .* http://example.com/ [L,R=301] + # Modify the RewriteBase if you are using Drupal in a subdirectory and # the rewrite rules are not working properly. #RewriteBase /drupal Index: sites/default/settings.php =================================================================== RCS file: /cvs/drupal/drupal/sites/default/settings.php,v retrieving revision 1.24 diff -u -p -r1.24 settings.php --- sites/default/settings.php 8 Jan 2006 12:10:12 -0000 1.24 +++ sites/default/settings.php 8 Apr 2006 08:37:47 -0000 @@ -92,11 +92,16 @@ $db_prefix = ''; * The URL to your Drupal installation. * * Examples: + * $base_url = 'http://example.com'; * $base_url = 'http://www.example.com'; * $base_url = 'http://www.example.com:8888'; * $base_url = 'http://www.example.com/drupal'; * $base_url = 'https://www.example.com:8888/drupal'; * + * Beware: if your site is usually accessible both with and without the prefix www. + * you might one to force users to use only one of the possibilities by + * adapting the relevant settings in .htaccess. See also cookie settings below. + * * It is not allowed to have a trailing slash; Drupal will add it * for you. */ @@ -125,6 +130,22 @@ ini_set('session.use_trans_sid', 0); ini_set('url_rewriter.tags', ''); /** + * Cookie domain settings. + * + * If you wish your site to be accessibel both with and without the www. prefix, + * you can adjust adapt and uncomment the following setting. Please note the leading dot in the + * domain name. + * + * Warning: a cookie with a leading dot will be accessible by ALL subdomains. There could be + * security and privacy implications depending on who own those subdomains and what other software + * is used to serve them. + * It should be safe if you have no other subdomains beside the www. and both domains (with and without the www. + * serve the same drupal installation. + */ + +# ini_set('session.cookie_domain', '.example.com'); + +/** * Variable overrides: * * To override specific entries in the 'variable' table for this site,