Im trying to redirect few browsers using htaccess to a page that would suggest to update their browser and I cant figure it out with the .htaccess file:
Currently I am using:
RewriteCond %{HTTP_USER_AGENT} "MSIE 6"
RewriteCond %{REQUEST_URI} !^/ie/
but that transfers only internet explorer 6. How can I add more browsers and where can I find their user_agent names? I found this article online: http://evansims.com/6032/using-htaccess-to-redirect-obsolete-browsers/ which suggests this:
RewriteCond %{HTTP_USER_AGENT} "Opera/3" [or]
RewriteCond %{HTTP_USER_AGENT} "Opera/2" [or]
RewriteCond %{HTTP_USER_AGENT} "Opera/1" [or]
RewriteCond %{HTTP_USER_AGENT} "Safari/4" [or]
RewriteCond %{HTTP_USER_AGENT} "Safari/3" [or]
RewriteCond %{HTTP_USER_AGENT} "Safari/2" [or]
RewriteCond %{HTTP_USER_AGENT} "Safari/1" [or]
RewriteCond %{HTTP_USER_AGENT} "Navigator/" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 6" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 5" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 4" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 3" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 2" [or]
RewriteCond %{HTTP_USER_AGENT} "MSIE 1"
RewriteRule . upgrade.html [L]
but it doesn't seem to work for me. Is there any website that provides a list with the http user agents in bulk? For example when I say Firefox 3.0 it means all versions including 3.6
This website: http://www.useragentstring.com/pages/Firefox/ has hundreds of user agents which Im pretty sure there is a way to include all of them in one row? ( Like IE6,7 Firefox 1 to 3 (including 3.6), Opera 1 to 10 etc )