Overview
Besides the standard redirect script that you use to redirect DudaMobile sites, there are times where you may require a special type of redirect script. This article covers all the redirect scripts that we have available.
See types of redirects below.
Standard redirect
This is the redirect you will use for 90% of your sites. If you are a direct DudaMobile user, install this redirect in your header;
Standard redirect script
<script type="text/javascript" src="http://static.mobilewebsiteserver.com/redirect.js"></script> <script type="text/javascript">DM_redirect("ENTER_MOBILE_URL_HERE");</script>
HTTPS redirect
If you have a site that's using HTTPS or SSL, the standard redirect script won't work when loaded. Instead, use our HTTPS compatible redirect script.
Redirect script for direct users;
<script type="text/javascript" src="https://s3.amazonaws.com/static.dudamobile.com/DM_redirect.js"></script> <script type="text/javascript">DM_redirect("ENTER_MOBILE_URL_HERE");</script>
Cookie redirect
If your mobile site requires that users visit the desktop site on their mobile phones, you may encounter the issue with the redirect sending users in a loop due to the standard redirect script. To fix this, you can use cookies to tell the browser to not redirect after the user clicks a link to visit the desktop site (usually located in the footer of your website).
<script type="text/javascript" src="http://static.dudamobile.com/DM_redirect_cookie.js"></script> <script type="text/javascript">DM_redirect("ENTER_MOBILE_URL_HERE");</script>
Note, that once a user visits the desktop website on their phones, the cookie redirect will stop redirecting users to the mobile site unless they clear their cookies and cache. Only use the cookie redirect if visiting the desktop site is a required.
Cookie and HTTPS redirect
A combination of the HTTPs and Cookie redirect. Remember to use the cookie redirect if required.
<script type="text/javascript" src="http://s3.amazonaws.com/DM_redirect_cookie.js"></script> <script type="text/javascript">DM_redirect("ENTER_MOBILE_URL_HERE");</script>
True redirect script
You can use this redirect script to redirect users directly to a page on your mobile site. This is useful if you're experiencing certain issues with redirecting to the wrong homepage.
Note, that once a user visits the desktop website on their phones, the cookie redirect will stop redirecting users to the mobile site unless they clear their cookies and cache. Only use the cookie redirect if visiting the desktop site is a required.
<script src="http://static.dudamobile.com/DM_redirect.js" type="text/javascript"></script>
<script type="text/javascript"> DM_redirect("ENTER_MOBILE_URL_HERE", true);</script>