Support » Fixing WordPress » [HELP]Mobile Redirect on homepage ONLY to a mobile Homepage

  • I have a site where cannot live without this flash slider plugin that is only found on the homepage. I figured that I would just create another page that looks the same as the homepage, but replace the flash slider with a JS slider. Then I would just redirect mobile users from the homepage to the mobile homepage.

    I want mobile users who goes to to go to instead. However if a mobile user goes to I don’t want them going to I only need a mobile redirect on the homepage only.

    To my surprise I couln’t find a plugin that only allowed a mobile redirect from one page to another. I know the cheesy workaround would be have two different WP installs that emmulate eachother and just use a plugin that redirects users to that other site, but that means I have to copy every post I do.

    I have attempted a couple of ways of doing this.

    FAIL attempt at doing this with PHP

    if(is_home()) {

    I am using this script, mobile_device_detect.php from

    FAIL attempt at doing it in httaccess

    # BEGIN Mobile redirect for the video
    <IfModule mod_rewrite.c>
        RewriteEngine On
        # RewriteRule ^mobile/ - [L]
        # redirect / to /mobilehome/index.html for mobile browsers
        RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
        RewriteRule ^\index.php$ /mobilehome/index.php [L,R=302]
    # END Mobile redirect

    If anyone knows a good way of doing this mobile direction, please help!!!

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • i am also desperate for a solution to this!

    I was able to get this to work using the ‘s code and a little variation of what you tried before.
    I uploaded the php file from the site to my child theme’s folder and added the following code to the functions.php file in my child theme.


    Worked like a charm.

    Hope this helps.


    Pardon the bump on an old post.

    Mat Lipe– I tried using your solution, but it seems to redirect all my pages from mobile devices to the selected page. Do you know how to set only one redirect (for the homepage)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[HELP]Mobile Redirect on homepage ONLY to a mobile Homepage’ is closed to new replies.