WordPress.org

Ready to get started?Download WordPress

Forums

redirect *.domain.com* to *.domain.net* (6 posts)

  1. rublue
    Member
    Posted 10 months ago #

    Hello all, i have multisite, but i wanna redirect it to new domain. How i do it?
    redirect *.domain.com* to *.domain.net*
    Thanks for respon ;)

    *i have copy all file and database from domain.com to domain.net

  2. What is domain.com now? Nothing? Then you should be able to park (or mirror) the old domain onto the new one.

    Which isn't a WP question but a 'how to point an old domain to a new one'

  3. rublue
    Member
    Posted 10 months ago #

    I'm sorry, it's wordpress multisite.
    i have old domain with wordpress multi site, i want to move it to new domain.

    i'm using this code to redirect

    RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
    RewriteRule ^(.*)$ "http\:\/\/new\.net\/$1" [R=301,L]

    but that doesn't work for its subdomain.

  4. i have old domain with wordpress multi site, i want to move it to new domain.

    Okay so there are two parts.

    1) Moving the site (which you did and THAT is the 'multisite' part)

    2) Redirecting the old domain to the new one.

    #2 isn't anything to do with WordPress at all, it's just normal WebStuff.

    RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
    RewriteRule ^(.*)$ "http\:\/\/new\.net\/$1" [R=301,L]

    That's not working because you said 'If this is old.com...' not 'If this is <anything>.old.com'

    Surprisingly you'll want this:

    RewriteCond %{HTTP_HOST} !^www.old.com$ [NC]
    RewriteRule ^(.*)$ http://new.com/$1 [R=301,QSA,L]
  5. rublue
    Member
    Posted 10 months ago #

    RewriteCond %{HTTP_HOST} !^www.old.com$ [NC]
    RewriteRule ^(.*)$ http://new.com/$1 [R=301,QSA,L]

    that's doesn't too for redirect <anything>.old.com to <anything>.new.com
    Thanks for respon Ipstenu :)

  6. Does it redirect anything at all?

    FWIW, that works on my server, but they can all be different.

    Can you park the old.com domain on top of the new.com one in your control panel instead? Otherwise the best way would be in your virtual hosts:

    <VirtualHost *:80>
        ServerName old.com
        Redirect permanent / http://new.com/
    </VirtualHost>

Reply

You must log in to post.

About this Topic