Created
          April 26, 2019 02:38 
        
      - 
      
- 
        Save sarvar/0c784c34c820ed7b808573e8a4f09c49 to your computer and use it in GitHub Desktop. 
    301 редирект с одного домена на другой
  
        
  
    
      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
    
  
  
    
  | RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^www\.old-site\.ru$ [NC] | |
| RewriteRule ^(.*)$ https://new-site.ru/$1 [L,R=301] | |
| RewriteCond %{HTTP_HOST} ^old-site\.ru$ [NC] | |
| RewriteRule ^(.*)$ https://new-site.ru/$1 [L,R=301] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment