-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdm.cfm
40 lines (40 loc) · 883 Bytes
/
dm.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!---
mobile vs. desktop redirector
this page should always be called with variable "r" set to wherever we're going.
If it isn't, make them pick.
If it is, set a cookie based on the value of r and redirect them
set a cookie and redirect ---->
<cfset r=replace(r,"//","/","all")>
<cfif isdefined("r")>
<cfif r contains "#Application.mobileURL#/">
<cfcookie
name="dorm"
value="mobile"
expires="never"
/>
<cfelse>
<cfcookie
name="dorm"
value="desktop"
expires="never"
/>
</cfif>
<cfoutput>
<!----
---->
<cflocation url="#r#" addtoken="false">
Click if you are not redirected:
<a href="#r#">
#r#
</a>
</cfoutput>
<cfelse>
I'm not sure how you got here....you're probably looking for the
<a href="/">
desktop site
</a>
or the
<a href="#Application.mobileURL#">
mobile site
</a>
</cfif>