Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Redirecting blog.example.com to www.example.com/blog

  • 06-02-2017 1:50pm
    #1
    Registered Users, Registered Users 2 Posts: 2,113 ✭✭✭


    Hi folks. I'm usually pretty OK with this sort of thing but DNS is breaking my melt at the moment.

    So a community project I work on recently went from a simple HTML website to a Wordpress site (and please no digs about Wordpress being the most targeted platform going, etc.). There was "political" reasons behind the move, that I had no say in.

    They had a small blog on Blogger, which could be reached by going to blog.example.com. Now with Wordpress, there is the inbuilt blog at www.example.com/blog so I'm moving the few blog posts from blogger to the new Wordpress site.

    The thing is, a lot of their flyers from the recent past all referred to the blog as being at blog.example.com. The new flyers will be updated (obvs), but we want to catch anybody going to blog.example.com and send them automatically to www.example.com/blog.

    I can't seem to see a way to do it in DNS. It's simple,cheapo hosted site, so no fixed IP address or anything like that. The current CNAME points blog.example.com to ghs.google.com.

    Much searching has led me to a page/service called redirect.center which seems like it could fit the bill.

    Is this my only option, or has anybody got any other wizard solutions to solve my dilemma?

    Thanks in advance.


Comments

  • Closed Accounts Posts: 31,152 ✭✭✭✭KERSPLAT!


    I know H-Sphere had a redirect option. That's a basic shared hosting platform, have you checked yours for similar?


  • Closed Accounts Posts: 31,152 ✭✭✭✭KERSPLAT!


    I'm sure you could just put in a cname too but I'm not sure how that will affect the one already there


  • Registered Users, Registered Users 2 Posts: 2,113 ✭✭✭ItHurtsWhenIP


    KERSPLAT! wrote: »
    I know H-Sphere had a redirect option. That's a basic shared hosting platform, have you checked yours for similar?

    Yeah. There is a redirect facility, but it only works on the bit after the domain name ... e.g. http://www.example.com/ThisBitCanBeRedirectedToAnywhere
    KERSPLAT! wrote: »
    I'm sure you could just put in a cname too but I'm not sure how that will affect the one already there

    The CNAME won't allow me to add the /blog to the end of the domain. I'd removed the old one and tried to add it, but no joy.


  • Closed Accounts Posts: 783 ✭✭✭nsa0bupkd3948x


    Who is the domain name registered with and who is the hosting with? If the domain name servers are point to the hosting account you'll be able to do the redirect with .htaccess.


  • Registered Users, Registered Users 2 Posts: 2,113 ✭✭✭ItHurtsWhenIP


    Who is the domain name registered with and who is the hosting with? If the domain name servers are point to the hosting account you'll be able to do the redirect with .htaccess.

    Name servers are all pointing correctly.

    .htaccess ... new one on me, so I've had a look ... would something like this work:
    RewriteEngine On
            RewriteCond %{HTTP_HOST} blog.example.com$
            RewriteRule ^$ http://www.example.com/blog [L,R=301]
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 725 ✭✭✭Mickalus


    Been a while since I've worked with Wordpress, but I seem to recall you could do this within the Wordpress Admin UI.

    Check this site out for some ideas / help.
    http://www.inmotionhosting.com/support/website/wordpress/wordpress-changing-the-site-url-and-home-settings

    If you have a local / test domain I'd recommend testing first. Or at least backup everything properly before making changes. Some of these changes if done incorrectly can render your site inaccessible.


  • Registered Users, Registered Users 2 Posts: 2,113 ✭✭✭ItHurtsWhenIP


    I talked to somebody who helped me out.

    The original blog was in blogger, so using tips at this: http://www.bloggertipsseotricks.com/2015/06/add-custom-redirect-post-url.html I was able to get it to redirect to the Wordpress site.

    It takes about a second or two to do the re-direct (on my slow-ass connection), but it does what I need.

    Thanks for the help folks.


Advertisement