Uncategorized – Michael Groff /blog Expand or Die Wed, 12 Dec 2018 16:14:02 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 Redirect everything but robots.txt in IIS /blog/redirect-everything-robots-txt-iis/ Sat, 30 Apr 2016 20:46:13 +0000 /blog/?p=513 You can use the following URL Rewrite rules to redirect everything but a robots.txt file from one domain to another. 

Requirements

  • IIS 7.0 or greater
  • URL Rewrite 2.0

Explanation: There are actually three rules here and they are listed as follows:

  • Robots.txt file rewrite – this rule says to do nothing when a request come through for domain.com/robots.txt
  • Non-www – this rule redirects anything non-www.groffskiii.com to groffbox.com
  • www – this rule redirects anything www.groffskiii.com to groffbox.com

Screenshot of Rules

URL_rewrite_robots.txt

Rules in text format

        
            
                
                
                    
                    
                        
                    
                    
                
                
                    
                    
                        
                    
                    
                
                
                    
                    
                        
                    
                    
                
            
        
]]>