Creating a URL Redirect for Mobile

Task: The merchant wants to perform a URL redirect for mobile customers to a mobile site. The goal is that any customer using a mobile phone is automatically redirected from the main site to a mobile site.

Customized solution: You can redirect customers based on the user-agent they use, for example you can filter on mobile user agents and redirect them to a mobile site within your application.

Example:

This example shows how you can perform a host redirect based on a user agent header. With each rule, you can associate a precondition based on the content of user-agent HTTP header.

In this example, an HTTP request with a User-Agent header containing iphone or ipod is redirected (301) to mobile.sitegenesis.com, and those with blackberry to bb.sitegenesis.com.

* * "www.sitegenesis.com": [
* {
* "if-agent-contains": ["iphone","ipod"],
* "host": "mobile.sitegenesis.com",
* },
* {
* "if-agent-contains": ["blackberry"],
* "host": "bb.sitegenesis.com",
* }
* ],
*/ 
Note: If you are using the legacy aliases method, you don't need to do anything to use the new JSON version. You can simply apply all rules to the new format.

Business Manager solution: You can also perform the previous function:

  1. Select site > Merchant Tools > Site URLs > Aliases.
  2. Review how site aliases are set for the SiteGenesis application.