Title: PHP Mobile Redirect
Author: Code96
Published: <strong>2013 年 3 月 10 日</strong>
Last modified: 2013 年 6 月 5 日

---

搜索插件

![](https://ps.w.org/php-mobile-redirect/assets/banner-772x250.png?rev=679153)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/php-mobile-redirect_949495.svg)

# PHP Mobile Redirect

 作者：[Code96](https://profiles.wordpress.org/code96/)

[下载](https://downloads.wordpress.org/plugin/php-mobile-redirect.1.4.zip)

 * [详情](https://cn.wordpress.org/plugins/php-mobile-redirect/#description)
 * [评价](https://cn.wordpress.org/plugins/php-mobile-redirect/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/php-mobile-redirect/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/php-mobile-redirect/#developers)

 [支持](https://wordpress.org/support/plugin/php-mobile-redirect/)

## 描述

This plugin easily detects mobile devices and redirects them to the mobile version
of your site. This plugin also gives you the ability to bypass the mobile redirect
based upon a cookie that is set on your mobile site. This allows you to redirect
mobile users and give the option to “View Full Site.”

**If you are upgrading you must enable the redirect via Settings > PHP Redirect**

To set the cookie simply add the following PHP code to your mobile site:

setcookie(“mobile”,”m”, time()+3600, “/”);

**The mobile redirect bypass cookie is optional, and should only be used to give
your users a “View Full Site” option**

Code 96 offers [WordPress Design](http://www.code96wd.com) services and custom [WordPress Themes](http://www.code96wd.com/premium-wordpress-themes/).

## 安装

 1. Upload the zip file to the /wp-content/plugins/ directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to Settings > PHP Redirect.
 4. Enable the mobile redirect by checking the enable checkbox.
 5. Put in the mobile site URL (excluding http://) to the website you would like to
    redirect mobile traffic to.
 6. Select the name of the cookie you will set on your mobile site to bypass the redirect.
 7. Select “Save Options” and you are done.

## 常见问题

  Where is the plugins settings page?

The settings are located in your WordPress Dashboard under Settings > PHP Redirect

  What format should the URL be in the PHP Redirect settings?

Your should enter your full URL without “http://”.

  What is the cookie name?

The name of the cookie is set on your mobile site page, and if you are using the
sample code the name is “mobile”. This setting is important as the redirect script
will evaluate the cookie name in order to bypass the redirect. If the actual cookie
name and the cookie name under the settings menu does not match, the bypass will
fail.

  The script will only bypass the redirect for a short period of time?

The bypass of the redirect is conditional on the cookie that is set on your mobile
site. If you have used the default code to set the cookie, the cookie will expire
in 3600 seconds or one hour. If you would like to change this time simply modify
the cookie settings on your mobile site.

## 评价

此插件暂无评价。

## 贡献者及开发者

「PHP Mobile Redirect」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Code96 ](https://profiles.wordpress.org/code96/)

[帮助将「PHP Mobile Redirect」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/php-mobile-redirect)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/php-mobile-redirect/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/php-mobile-redirect/)，或通过[RSS](https://plugins.trac.wordpress.org/log/php-mobile-redirect/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/php-mobile-redirect/)。

## 更新日志

#### 1.4

 * Updated Mobile_Detect class to current version 2.6.1

#### 1.3

 * Admin option added to exclude tablets from the redirect.

#### 1.2

 * Fixed issue with detecting iPad’s.

#### 1.1

 * Added the option to enable/disable the mobile redirect.

#### 1.0

 * Origninal Release

## 额外信息

 *  版本 **1.4**
 *  最后更新：**13 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 3.2 或更高版本 **
 *  已测试的最高版本为 **3.5.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/php-mobile-redirect/)
 * 标签
 * [mobile detect](https://cn.wordpress.org/plugins/tags/mobile-detect/)[mobile detection](https://cn.wordpress.org/plugins/tags/mobile-detection/)
   [mobile redirect](https://cn.wordpress.org/plugins/tags/mobile-redirect/)
 *  [高级视图](https://cn.wordpress.org/plugins/php-mobile-redirect/advanced/)

## 评级

 3.8 星（最高 5 星）。

 *  [  5 条 5 星评价     ](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/php-mobile-redirect/reviews/)

## 贡献者

 *   [ Code96 ](https://profiles.wordpress.org/code96/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/php-mobile-redirect/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=63NWD4R6PNC76)