redirecting a website using 301 redirect

Discussion in 'Site & Server Administration' started by akinak, Apr 30, 2008.

  1. #1
    I need to redirect using a 301 redirect. I searched on internet and it says that I need a .htaccess file for this. I searched and found the code but it says create a file on notepad and save as .htaccess (no extension). But notepad automatically gives it an extension of .txt. Is this fine? How to do this? Can somebody plz help
     
    akinak, Apr 30, 2008 IP
  2. albemarle24

    albemarle24 Well-Known Member

    Messages:
    244
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Youre almost there. Use your FTP program to rename it to .htaccess

    Make sure you dont have an existing .htaccess though!

    If you do, just add the redirect to the existing one.

    If you have problems, your host will typically take care of this for you.
     
    albemarle24, Apr 30, 2008 IP
  3. akinak

    akinak Peon

    Messages:
    256
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you. Also, can you please clear me the concept of 301 redirect. I don't think Iam clear with it. Here is what Iam trying to do - I have a website www.site-usa.org. I would like to host it on a different server now and also like the domain name changed to www.site-us.org. So, now what I did is redirected www.site-us.org to www.site-usa.org using a 301 redirect. Is that allright? Will my search engine rankings still be the same?

    Also, I want to use google analytics on this site. So where should I add the code - to www.site-us.org or to www.site-usa.org?
     
    akinak, May 1, 2008 IP
  4. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I can guess your problem :) This is a general behavior of windows. After putting the content inside a notepad go to Save As and put the following file name ".htaccess", remember to put the quotation i have used. This should save a .htaccess file and now you can move that file to your public_html or root web directory to take effect.

    Good Luck :)
    Regards
     
    mellow-h, May 1, 2008 IP
  5. albemarle24

    albemarle24 Well-Known Member

    Messages:
    244
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    138
    #5
    This discusses redirects, but not your exact application:

    I think the syntax for your application would be similar though. There are several good threads about this on DP.
     
    albemarle24, May 2, 2008 IP
  6. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #6
    I have read several solutions redirecting a website usiing 301 redirect and I know all of them work but, could someone explain what makes a diference between each other. I bolded the part of the rule chaning in each case:

     
    Trusted Writer, May 3, 2008 IP