4 Replies - 3854 Views - Last Post: 26 September 2012 - 04:22 PM

#1 laytonsdad  Icon User is offline

  • Cheese and Sprinkles
  • member icon

Reputation: 431
  • View blog
  • Posts: 1,825
  • Joined: 30-April 10

using htaccess to redirect to error page when user is using IE browser

Posted 15 September 2012 - 10:58 AM

Hello,

I have created a site that has some problems I am not ready to change when a user is using IE. I want to have a IE browser user to be directed to an error page if they are using IE. Is this possible?
Is This A Good Question/Topic? 0
  • +

Replies To: using htaccess to redirect to error page when user is using IE browser

#2 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: using htaccess to redirect to error page when user is using IE browser

Posted 18 September 2012 - 06:43 AM

Why would you do this, I can't think of any scenario where this would be a good idea. Yes IE is generally a pain in the ass, but you would probably be losing a very large proportioner of your audience.

With the above out of the way; you can do this in Javascript, but probably shouldn't.

You could also do this server side, by using get_browser(), or if you cant do that you could use the browser detection class.

There are plenty of resources which discuss this further.

This post has been edited by KingCuddles: 18 September 2012 - 06:45 AM

Was This Post Helpful? 1
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: using htaccess to redirect to error page when user is using IE browser

Posted 18 September 2012 - 06:55 AM

It you want to do this on the server level, you can do that using mod_rewrite in a .htaccess file. See the RewriteCond directive. It gives you access to the browser name via the HTTP_USER_AGENT variable. There are examples a bit further down that page of how you can use that for this very purpose. (Hint: all IE versions include "MSIE" in the user agent string.)
Was This Post Helpful? 0
  • +
  • -

#4 laytonsdad  Icon User is offline

  • Cheese and Sprinkles
  • member icon

Reputation: 431
  • View blog
  • Posts: 1,825
  • Joined: 30-April 10

Re: using htaccess to redirect to error page when user is using IE browser

Posted 26 September 2012 - 08:39 AM

So, you think that it would be better to just find and fix the viewing errors from IE, rather than direct them to a page that's says there are known issues with IE's older versions and we suggest updating or changing browsers?
Was This Post Helpful? 0
  • +
  • -

#5 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: using htaccess to redirect to error page when user is using IE browser

Posted 26 September 2012 - 04:22 PM

Better from what perspective?

Is it better for your users? Of course. Many users either don't care enough to, or are unable to, change from their current browser. Making the site compatible with as many browsers as possible makes it easier for those users.

Is it better for you? Perhaps not. It'll take time to fix, and depending on the scope of the problem; the time it will take to fix it, then it may be better for you to accept that a certain amount of users won't be able to use the site.

If we are talking about an issue that affects all versions of IE, then that is a pretty significant loss. Generally speaking, that would be unacceptable. If it only affects certain versions, say IE7 and down, then you'd have to make that determination yourself. Perhaps monitor how many IE users try to view your site for the next month, and then decide whether you're OK with losing that amount.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1