Created
          April 26, 2012 02:08 
        
      - 
      
- 
        Save kellybell/2495197 to your computer and use it in GitHub Desktop. 
    Pantheon settings.php URL normalizing code - rewrites www.sitename.com to sitename.com
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && | |
| $_SERVER['PANTHEON_ENVIRONMENT'] === 'live') { | |
| if ( $_SERVER['HTTP_HOST'] == 'live.SITENAME.gotpantheon.com' || | |
| $_SERVER['HTTP_HOST'] == 'www.SITENAME.com') { | |
| header('HTTP/1.0 301 Moved Permanently'); | |
| header('Location: http://SITENAME.com'. $_SERVER['REQUEST_URI']); | |
| exit(); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment