• Resolved sportsnapper

    (@sportsnapper)


    I’m not sure this is specific to Multisite – but that’s what I’m running.

    I’ve built a new site for a customer, and it’s happily running on a test domain that I have.

    The new domain (or rather the old website domain name) is now pointing to my host at 12.34.56.789, as per the multisite network page info. However, this is my 1and1 account, that hosts many things.

    My wordpress installation is located at /blog. So I really want to redirect mynewwebsite.co.uk to /blog – where I’ve set up mynewwebsite.co.uk as a primary domain for it, using the domain mapping plugin

    So – I need a .htaccess file in the root directory to redirect mynewwebsite.co.uk to the /blog directory.

    I’ve now tried countless variations and I still get a 404 not found for mynewwebsite.co.uk

    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^(www\.)?mynewwebsite\.co.uk$
    RewriteCond %{REQUEST_URI} !^/blog
    
    RewriteRule ^(/)?$ blog [L]

    Any ideas, does tyhe .htaccess in the /blog directory interfere? I can get the doamin name transfered into my 1and1 account – but ideally I’d like to get this working as is….

Viewing 11 replies - 1 through 11 (of 11 total)
  • Did it work before you tried to redirection to /blog?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    So I really want to redirect mynewwebsite.co.uk to /blog

    That doesn’t work with MultiSite. If you want it in mynewwebsite.co.uk, you have to install it in mynewwebsite.co.uk (or in the root of your HTML folder). Otherwise, you’ll always have /blog in the URL. That’s just how it goes rigt now.

    Thread Starter sportsnapper

    (@sportsnapper)

    The multisite has always been in /blog – and there are three other sites successfully running in there eg smart-images.co.uk

    But that domain is registered as part of my 1and1 isp account – so the domain is pointed to /blog using their control panel – which is pretty hard to use compared to cpanel.

    What I’m trying to do is get the redirect of mynewwebsite.co.uk to point at /blog directory in my 1and1 webspace usinag an .htaccess- once it’s there I’m presuming that the wordpress multisite will take over.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The multisite has always been in /blog – and there are three other sites successfully running in there eg smart-images.co.uk

    So you have 123.45.67/blog as your ‘main’ site and want the domain to take over so it’s mydomain.com/blog ?

    What I’m trying to do is get the redirect of mynewwebsite.co.uk to point at /blog directory in my 1and1 webspace usinag an .htaccess-

    That’s not terribly hard but

    once it’s there I’m presuming that the wordpress multisite will take over.

    THAT won’t work if you don’t map the domain in WordPress as well. At which point, why aren’t you mapping the domain?

    You can’t map a domain name with a folder as part of the name. this isn’t a multisite issue, but a DNS issue. You can’t even do this with Blogger.

    Thread Starter sportsnapper

    (@sportsnapper)

    I guess I’m not explaining this well.

    You can’t map a domain name with a folder as part of the name. this isn’t a multisite issue, but a DNS issue. You can’t even do this with Blogger.

    I know – that’s not what I’m trying to do.

    So you have 123.45.67/blog as your ‘main’ site and want the domain to take over so it’s mydomain.com/blog ?

    Almost. The ip, 123.45.67.8 points to the root of the web space. The directory /blog, is where the wordpress multisite resides. The existing wordpress domains point to that directory – not by virtue of a specific .htaccess in the root, but by the 1and1 control panel. I assume that under the covers that there is some form of redirect happeneing, but I don’t know how. That’s fine and all works well. I’m not trying to replace that.

    So the new site, mynewdomain.co.uk will be one site in the multisite installation – it’s there already as site id 4, and has mynewdomain.co.uk as it’s primary domain (i’ve replaced the current domain name that points at it), using the site mapping (/wp-admin/network/settings.php?page=dm_domains_admin) so

    THAT won’t work if you don’t map the domain in WordPress as well. At which point, why aren’t you mapping the domain?

    – as far as I’m concerned I have done this.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Okay so you’re using this plugin to map domains: http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    Useful info 😉

    And now what we have is this: You want to map mynewdomain.co.uk to 123.45.67.8/blog/subsite

    The directory /blog, is where the wordpress multisite resides. The existing wordpress domains point to that directory – not by virtue of a specific .htaccess in the root, but by the 1and1 control panel.

    I preface this by mentioning I have ZERO knowledge of 1&1’s control panel. Am I understanding that you’ve pointed myotherdomain.co.uk to 123.45.67.8/blog/myotherdomain and if worked?

    If so, what’s different between myotherdomain.co.uk and mynewdomain.co.uk that you can’t do that again?

    You need to find the equivalent in the 1and1 control panel to an “add-on” domain, and specify the right folder (which would be the /blog/ one) to send your mapped domain to.

    Thread Starter sportsnapper

    (@sportsnapper)

    The 1and1 equivalent is an external domain. I’ve started making progress on this since my last post. Once I can get the domain to register in the control panel I think it will then work. I was trying to avoid getting anything else involved with 1and1 as I want to move away from them as I think there support is appalling.

    Thanks for your help – and I’m sorry for any confusion caused.

    Yes and yes. 😀

    Thread Starter sportsnapper

    (@sportsnapper)

    Sorted – the site is now live.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Domain redirection’ is closed to new replies.