Now that you have your OpenMenu, and received the free website site we give you, you want to redirect mobile visitors to your website to your restaurant’s mobile site on OpenMenu that stays in sync with all your menu changes.
Sample: http://openmenu.com/restaurant/sample
The address for your restaurant’s mobile site is in the format of: http://openmenu.com/restaurant/OpenMenu_ID . If you’re having trouble identifying your mobile site’s URL use our Search tool to locate your restaurant. A link to your mobile site and QR Code is provided.
Redirecting from an existing page:
Now that you can access your complimentary mobile site you can safely redirect your mobile site to our page. Using one of the codes below your mobile site can easily, and properly, perform a redirect.
PHP
<?php header ("HTTP/1.1 301 Moved Permanently"); header ("Status: 301 Moved Permanently"); header ("Location: http://openmenu.com/m/restaurant/OPENMENU_ID"); exit(0); ?>
ASP.NET
<script runat="server"> private void Page_Load (object sender, System.EventArgs e) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://openmenu.com/m/restaurant/OPENMENU_ID"); } </script>
Javascript
<script type="text/javascript"> <!-- window.location = "http://openmenu.com/m/restaurant/OPENMENU_ID"; //--> </script>
ASP
<% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://openmenu.com/m/restaurant/OPENMENU_ID" %>
Detecting a mobile device:
If you are interested in auto-detecting a mobile device to redirect the visitor for them you can use this MIT License mobile detection script (php).