WordPress.org

Ready to get started?Download WordPress

Forums

Hook into subdomain not found (2 posts)

  1. arashster
    Member
    Posted 2 years ago #

    Hi,

    Imagine I have wordpress multisite running on domain1.com in subdomain mode.

    I want to redirect any subdomain that DOESN'T exist on domain1.com to another subdomain on domain2.com

    For example, if mysubdomain.domain1.com doesn't exist, I want to redirect to mysubdomain.domain2.com

    ex.
    first.domain1.com -> first.domain2.com

    But if second.domain1.com exists, I want the regular WP multisite blog to load up.

    How can I accomplish these? How can I hook into "subdomain not found"?

    Thanks

  2. I suspect you'd have to mess with this:

    define( 'NOBLOGREDIRECT', 'domain.com');

    Somehow pick up the subdomain and parse that ...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.