Copy link to clipboard
Copied
I need to find code that if a user is using Internet explorer 5, Internet explorer 6, Internet explorer 7 or Internet explorer 8 they get redirected to one page and if the are using any other browser including IE9 they go to another.
Something like this
<CFIF CGI.HTTP_USER_AGENT IS IE5 OR CGI.HTTP_USER_AGENT IS IE6 OR CGI.HTTP_USER_AGENT IS IE7 OR CGI.HTTP_USER_AGENT IS IE8 >
<cflocation go here>
<cfelse>
<cflocation go here>
</cfif>
Any help ?
Go to this Web page to see a full list of http_user_agent for Internet Explorer.
http://www.useragentstring.com/pages/Internet%20Explorer/
<cfif cgi.http_user_agent CONTAINS "MSIE 5"
OR cgi.http_user_agent CONTAINS "MSIE 6"
OR cgi.http_user_agent CONTAINS "MSIE 7"
OR cgi.http_user_agent CONTAINS "MSIE 8">
<!--- redirect to page A --->
<cfelse>
<!--- redirect to page B --->
</cfif>
As you can see, there is a pattern in the user agent string. You might want to use Regular Expression
...Copy link to clipboard
Copied
Go to this Web page to see a full list of http_user_agent for Internet Explorer.
http://www.useragentstring.com/pages/Internet%20Explorer/
<cfif cgi.http_user_agent CONTAINS "MSIE 5"
OR cgi.http_user_agent CONTAINS "MSIE 6"
OR cgi.http_user_agent CONTAINS "MSIE 7"
OR cgi.http_user_agent CONTAINS "MSIE 8">
<!--- redirect to page A --->
<cfelse>
<!--- redirect to page B --->
</cfif>
As you can see, there is a pattern in the user agent string. You might want to use Regular Expression (Regex) to simplify the conditional clause.
<cfif
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more