Support » Networking WordPress » Different site names -> Redirection 301 to one site possible?

  • I have WP multi-site installed.

    On that multi-site there is a blog about how to fight hemorrhoids (www.xxxx.com/hemorrhoids)

    Since “hemorrhoids” is a difficult word to spell I would like different spelling (including wrong ones) to be redirected.

    Example:
    multisiteblog.com/hemorhoids –> multisiteblog.com/hemorhoids
    multisiteblog.com/haemorhoids –> multisiteblog.com/hemorhoids
    multisiteblog.com/hemorrhoids –> multisiteblog.com/hemorhoids

    In other words: I as superadmin want to be able to define aliases for a blog name. These aliases would then redirect to the “main/original” name.

    Is there any plugin for such a redirection?

    Any help is appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I don’t know if there’s a plugin, but you can certainly do that in .htaccess.

    Redirect 301 /hemorhoids http://multisiteblog.com/hemorhoids
    Redirect 301 /haemorhoids http://multisiteblog.com/hemorhoids
    Redirect 301 /hemorrhoids http://multisiteblog.com/hemorhoids

    Just put it above the WordPress lines in your .htaccess 🙂

    Thread Starter Eric Murphy

    (@knn)

    Yeah, I know I can do it per htaccess. But I wanted it more manageable either by the superadmin or by the blog admin.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You’d have to play with http://wordpress.org/extend/plugins/redirection/ and similar plugins to be sure.

    I would caution you with this: redirects have the potential to be very, very, dangerous. They really are best served if you do it ‘right’ inside .htaccess.

    Also you’re balancing the ‘weight’ a plugin with what you could optomize to one line of code:

    RewriteRule ^(hemorhoids|haemorhoids|hemorrhoids|hammeroids|moretypos|moretypos) http://multisiteblog.com/hemorhoids [L,R=301]

    (The super admin should have ssh/sftp access to the server anyway. If anything, a plugin to edit the .htaccess from the Network Admin screen would be the way to go)

    Thread Starter Eric Murphy

    (@knn)

    OK, thank you very much for your help.

    I will use

    RewriteRule ^(alias1|alias2|alias3)/(.*)$ http://xxx.com/finalfolder/$2 [R=301,L]

    It’s important to put it pretty at the top of the htaccess, otherwise WP will complain “You don’t have sufficient rights visit xxx.com/alias1”

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Doesn’t have to be at the very top, but it does have to be above the WP calls (as I mentioned 😉 ) so that you don’t loop through the WP look ups too many times. That would slow your site down over time.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different site names -> Redirection 301 to one site possible?’ is closed to new replies.