: 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
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>
More posts by @Caterina187
1 Comments
Sorted by latest first Latest Oldest Best
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>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.