Add new comment


Hi Bram,

Thanks for the great suggestions. These helped me a lot.

But the code for redirecting to 'www' in settings.php trows an error when the site is handled by drush. Therefore I use it like this:

// Check if Drupal is not running via command line & add www
if (php_sapi_name() != "cli") {
if ($_SERVER['HTTP_HOST'] == '') {
header('HTTP/1.0 301 Moved Permanently');
header('Location: //'. $_SERVER['REQUEST_URI']);

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.