How to Implament a 301 redirect to one Directory

Discussion in 'Programming' started by Monks, Apr 18, 2008.

  1. #1
    This is regarding: Site and Server Administration

    Can anyone lead me in the right direction here? I have a website that I put a blog on, and now I would like to permanently move the blog to its own domain and permanently move the website to a new domain. I'll illustrate:

    301 redirect: "www.mydomain.com/blog/" to "www.newblogdomain.com"
    301 redirect: "www.mydomain.com" to "www.newmydomain"

    I read online that I can create an .htaccess file in whichever directory I would like to forward. Does that mean I can create two .htaccess files for the same domain and put one in the directory and the other in the root and split the redirects to two different domains?

    Here is the .htaccess file I was planning on uploading to the /blog/ directory:

    redirect 301 /stefansblog/
    http://www.dialecticalreasoning.com/
     
    Monks, Apr 18, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    mwasif, Apr 19, 2008 IP
  3. Monks

    Monks Well-Known Member

    Messages:
    193
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Thanks for the help! I am going to give this a shot and I'll come back here and thank you again when it works :)
     
    Monks, Apr 19, 2008 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Any update?
     
    mwasif, Apr 22, 2008 IP
  5. Monks

    Monks Well-Known Member

    Messages:
    193
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    160
    #5
    Thanks for checking back with me. Right now, I don't have access to the root level of the server and can only access the public_html files. I am in the midst of transferring to a new fully manged server, and this is where I will need to implement the change. I am still getting all of my ducks in a row, as soon as I implement the 301, I'll come back here and report the results.

    Thanks for the help!
     
    Monks, Apr 28, 2008 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    You can try these in public_html as well. No need to go the root level :)
     
    mwasif, May 2, 2008 IP