Moving to a subdomain, how to keep links from 404? (4 posts)

  1. wesburke
    Posted 7 years ago #

    Hey guys,

    I am thinking of revamping my entire site http://www.cgcookie.com and moving it to a sub domain cg.cgcookie.com to develop it,etc.. My biggest concern is keeping external links current. My site receives a bit of traffic from external links into our articles and I would like to make sure these just don't hit 404's after the move has taken place.

    I have read a bit on permalinks, and am currently using the year/month/day/article-name

    Any suggestions or are there any articles online to read through while sipping some coffee?

  2. wesburke
    Posted 7 years ago #

    Hey guys - I was reading a bit more on this, but am I correct to think that I can set up a .htaccess file to redirect all traffic to the subdomain and keep/adjust the path?



  3. wesburke
    Posted 7 years ago #

    Okay I have dug up this code to use and it (from what I read). Will do exactly what I would need. Only issue is that I am getting an "Internal Server Error 500" when I implement it.

    Do you see anything off with it?

    Options -Indexes +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^cgcookie.com [NC]
    RewriteRule ^(.*)$ http://www.cgcookie.com$1 [L,R=301]
    RedirectMatch 301 ^/articles/(.*)$ http://cg.cgcookie.com/$1
  4. ozzywood
    Posted 6 years ago #

    Would love to hear if this worked as I'm trying to achieve the same.

Topic Closed

This topic has been closed to new replies.

About this Topic