<p>I agree with Bryan, personally I like to use the <a href="http://www.browser-update.org/en/" rel="nofollow">Browser-Update.org</a> notification.</p>

<p>Nevertheless, if you want to use <strong>.htaccess</strong> just make sure you put your redirect code before Crafts routing:</p>

<pre class="lang-htaccess prettyprint-override"><code>&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On

    # Redirect old Browsers
    RewriteCond %{HTTP_USER_AGENT} "MSIE [1-7]" [NC]
    RewriteRule ^(.*)$ http://something.com/else [R=301,L]

    # Crafts routing
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;
</code></pre>

CC BY-SA 3.0
2014-07-25T07:44:31.260Z
Would like to second the Browser-Update.org javascript bar. I'd certainly rewrite their page-on-click or other on-click result, which you can, as it's a little tilty so I'd like to make own best recommendations. The bar is nice, though.
narration_sd
CC BY-SA 3.0
2014-07-23T11:44:10.697Z
2014-07-23T11:44:10.697Z
Victor
<p>I can't understand why you would simply turn users away. It's part of why we use graceful degradation. It's ugly but usable in browsers that are old like IE7. In Craft's case, there's nothing stopping those methods from working because they are outside Craft's control. This is probably an IE7 bug.</p>

<p>My suggestion is to keep the users and just show them ugly content, or even add a div that explains why it's ugly. If it's really that important to redirect, use JavaScript. It works mostly fine in IE.</p>

CC BY-SA 3.0
2014-07-23T11:32:14.657Z
2014-07-23T11:32:14.657Z
Bryan Redeagle
<p>Traditional .htaccess or
<code>&lt;!--[if lt IE 7]&gt;&lt;meta http-equiv="refresh" content="0; url=/assets/errors/ie.html"/&gt;&lt;![endif]--&gt;</code> 
methods don't work to redirect users in Craft. </p>

<p>I know it may seem taboo, but quite frankly I don't want anyone who is using IE7 or below to access my site. I'd like to completely redirect them to a separate page/template that will instruct them on why they can't see the site and how to upgrade. </p>

<p>Any ideas how best to achieve this?</p>

<p>Cheers, Mark.</p>

<redirect>
Redirect IE7 or below users to a new page
# Redirect IE7 or below users to a new page

(Asked by: username_0 on 2014-07-23)

Traditional .htaccess or
methods don't work to redirect users in Craft.

I know it may seem taboo, but quite frankly I don't want anyone who is using IE7 or below to access my site. I'd like to completely redirect them to a separate page/template that will instruct them on why they can't see the site and how to upgrade.

Any ideas how best to achieve this?

Cheers, Mark.

**Tags:** redirect


---

## 2 answers

### Answer by username_1 on 2014-07-23. Score: 4

I agree with Bryan, personally I like to use the Browser-Update.org notification.
Nevertheless, if you want to use .htaccess just make sure you put your redirect code before Crafts routing:

    RewriteEngine On

    # Redirect old Browsers
    RewriteCond %{HTTP_USER_AGENT} "MSIE [1-7]" [NC]
    RewriteRule ^(.*)$ http://something.com/else [R=301,L]

    # Crafts routing
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]

> **Comments:**
> **username_2**: Would like to second the Browser-Update.org javascript bar. I'd certainly rewrite their page-on-click or other on-click result, which you can, as it's a little tilty so I'd like to make own best recommendations. The bar is nice, though.  

---

### Answer by username_3 on 2014-07-23. Score: 3

I can't understand why you would simply turn users away. It's part of why we use graceful degradation. It's ugly but usable in browsers that are old like IE7. In Craft's case, there's nothing stopping those methods from working because they are outside Craft's control. This is probably an IE7 bug.

My suggestion is to keep the users and just show them ugly content, or even add a div that explains why it's ugly. If it's really that important to redirect, use JavaScript. It works mostly fine in IE.


---

