Mobile app version of vmapp.org
Login or Join
Caterina187

: How to redirect all IE8 users to a specific URL? I have W2008 running IIS and have about 20 websites (all PHP, about half are WP) running on it. Currently I have this in the header on

@Caterina187

Posted in: #Iis7 #Redirects #WindowsServer2008

I have W2008 running IIS and have about 20 websites (all PHP, about half are WP) running on it.

Currently I have this in the header on a few sites and it is working. But it is getting hard to manage because even though I am the admin there are a lot of developers and they could overwrite the header if they wanted on most sites.

<!--[if IE 8]>
<script type="text/javascript">
window.location = "http://example.com/wedontsupportIE8.html";
</script>
<![endif]-->


Is there a way to set up a rule on the server that would have the same functionality?

Current rule I have tried:

I have added rules on web server and they basically don't work right. I had the redirect to /home/index.php already working for the past 6 months. When I add the new rule first it does the following:


in IE8 - 404 error for any directory on site and it reverts to the root
in IE10, FF, Chrome, Safari - it just redirects to /home as it should.


webconfig below

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="IE8rewriteall" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{HTTP_USER_AGENT}" pattern="*MSIE*" />
</conditions>
<action type="Rewrite" url="http://example.com/ie/index.html" />
</rule>
<rule name="Root Hit Redirect" stopProcessing="true">
<match url="^$" />
<action type="Redirect" url="/home/index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

Here you go.... this should work:

<rule name="IE8FacePalm" stopProcessing="true">
<match url="" ignoreCase="true" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="false">
<add input="{HTTP_USER_AGENT}" pattern="MSIE 8.0" />
</conditions>
<action type="Redirect" url="http://x.com/a-url" appendQueryString="false" />
</rule>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme