/[drupal]/contributions/modules/toggle_www/toggle_www.module
ViewVC logotype

Diff of /contributions/modules/toggle_www/toggle_www.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Sat Oct 21 11:13:15 2006 UTC revision 1.2, Sat Oct 21 11:27:35 2006 UTC
# Line 10  function toggle_www_help($section) { Line 10  function toggle_www_help($section) {
10  }  }
11    
12  function toggle_www_redirect($method = 0) {  function toggle_www_redirect($method = 0) {
13    if ($_SERVER['HTTP_HOST'] == 'localhost')
14    {
15      $method = 0;
16    }
17  // $method = 1 means redirect from www.example.com to example.com  // $method = 1 means redirect from www.example.com to example.com
18  if ($method == 1) {  if ($method == 1) {
19    if ( !strstr( $_SERVER['HTTP_HOST'], 'www.' )) // if its already example.com, take no action    if ( !strstr( $_SERVER['HTTP_HOST'], 'www.' )) // if its already example.com, take no action

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2