WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pull from one database for 2 domains? (7 posts)

  1. chaos67731
    Member
    Posted 3 years ago #

    Here is what I am trying to do, I want to run every thing off to the domain (http://zombiesaresexy.com) and make it so there is a mobile version but on a sub-domain. I have set up m.zombiesaresexy.com and moved over all the files to the new folder for the sub domain and it works ok/ish.

    What is the best way to do this?
    I am wanting it so the mobile uses the same data base just so the post stay the same.

    And why I so it works ok/ish is because everything on the m.zombiesaresexy.com still point to zombiesaresexy.com so it shows up but just does not work 100%

    Thanks for the help!

    James R.

  2. Why not use a mobile app plugin? http://wordpress.org/extend/plugins/tags/mobile

    No need for a second install.

  3. chaos67731
    Member
    Posted 3 years ago #

    I am wanting the mobile version of the site to be on m.domain.com

  4. You still don't need multisite for this. You can redirect your subdomain (m.yourdomain.com) to the mobile URL with .htaccess

    Not that you can't use multisite for this, but it's a lot more work.

  5. chaos67731
    Member
    Posted 3 years ago #

    Im not sure I get what your saying, I know I can use .htaccess to sent all mobile users to the m.domain.com but I am wanting the m.domain.com to be the same thing as the full site just cut down a lot. (mobile friendly)

    when I add *cf_action=show_mobile* to the end of the url nothing seems to change.

    Do you have a blog post or is there somewhere in the wiki that can give me more information on this?

  6. Other way around :)

    You want to redirect the subdomain to your MAIN site. Somethign like this? (UNTESTED CODE!)

    # SubDomains
    RewriteCond %{HTTP_HOST} ^m.domain.com [OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com
    RewriteRule ^(.*)$ http://domain.com/gallery/?cf_action=show_mobile=$1 [L]

    The idea is that when someone hits m.domain.com it transparently redirects (but does NOT change the URL) to grab the show mobile version.

  7. hermanvandermaas
    Member
    Posted 2 years ago #

    If you want a mobile website from the same WordPress installation and the same database as your desktop blog, you can use a mobile plugin for that.
    This plugin http://wordpress.org/extend/plugins/wptap-mobile-detector/ for example redirects mobile users to a URL of your choice.

Topic Closed

This topic has been closed to new replies.

About this Topic