301 redirect from a site to another site directory

Discussion in 'Google' started by corlas, Jan 23, 2010.

  1. #1
    Last edited: Jan 23, 2010
    corlas, Jan 23, 2010 IP
  2. gradiola

    gradiola Well-Known Member

    Messages:
    137
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    123
    #2
    The best way to redirect those pages is by using something called a "301 Redirect". What this 301 redirect does, is it blatantly redirects to a different page when it is triggered. What makes the 301 redirect the best? Not only does it accomplish your redirect - it does it safely. No having to worry about the search engines penalizing you for it. To be specific, the 301 redirect tells the browser, or in other cases, it tells the search engines "Hey this page has been moved, here is the correct URL!". Think of it as you getting mail that is not addressed to your name. Possibly addressed to somebody who has lived there prior to yourself. What do you do? You tell the post man (or woman) "Hey they don't live here anymore, here is the correct address". It is the same concept, pretty simple stuff.
     
    gradiola, Jan 23, 2010 IP
  3. corlas

    corlas Active Member

    Messages:
    208
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Hi thanks, yes I know that is why I have called the original first message 301 redirect.

    My questions really was:

    Since I see many example of code to achieve this goal, which one is the best to redirect from a website to another webside directory and not loosing PageRank in the process?

    Thanks and sorry if I wasn't clear enough. I look for the best code example for the htaccess file.
     
    corlas, Jan 23, 2010 IP
  4. suraja

    suraja Peon

    Messages:
    537
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That is another way to make a fake pagerank :)
     
    suraja, Jan 23, 2010 IP
  5. YugoSlavac

    YugoSlavac Well-Known Member

    Messages:
    1,345
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    105
    #5
    You'll have to mess around with your .htaccess file. That'll make your domain redirect to the one you want.

    Yugo,
     
    YugoSlavac, Jan 23, 2010 IP
  6. corlas

    corlas Active Member

    Messages:
    208
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    No thanks, nothing fake.
     
    corlas, Jan 23, 2010 IP
  7. earnincome

    earnincome Peon

    Messages:
    724
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    To redirect ALL files on your domain use this in your
    .htaccess file if you are on a unix web server:

    redirectMatch 301 ^(.*)$ http://www.domain.com
    redirectMatch permanent ^(.*)$ http://www.domain.com

    Hope this help you in redirecting.
     
    earnincome, Jan 23, 2010 IP
  8. corlas

    corlas Active Member

    Messages:
    208
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #8
    Hi thanks, finally we're getting there :)

    Does it work also if I have to redirect to a directory. i.e.: instead of:
    redirectMatch permanent ^(.*)$ http://www.domain.com

    I would use:
    redirectMatch permanent ^(.*)$ http://www.domain.com/blog/

    Would that work?

    Thanks
     
    corlas, Jan 23, 2010 IP
  9. earnincome

    earnincome Peon

    Messages:
    724
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Yes, it works. Make sure, you enter information in your .htaccess correct.
     
    earnincome, Jan 23, 2010 IP
  10. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #10
    the .htacess redirect would be the best i guess..
     
    Bohra, Jan 23, 2010 IP
  11. appleranger

    appleranger Peon

    Messages:
    339
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Increasing the .htaccess is your best bet to solve this problem.
     
    appleranger, Jan 23, 2010 IP
  12. youssefedwardsaber

    youssefedwardsaber Active Member

    Messages:
    254
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #12
    you can make it by the domain manager which you want to redirect. it can be from the dns control but you must check it in the help of the company which you registered the domain.
    you can make it also from the htaccess file by a simple statement
     
    youssefedwardsaber, Jan 24, 2010 IP
  13. Lex350

    Lex350 Notable Member

    Messages:
    1,889
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    215
    #13
    It is the best. I just did this an it worked fine. I also used WMT address change tool.
     
    Lex350, Jan 24, 2010 IP
  14. peterson82

    peterson82 Peon

    Messages:
    228
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I have not much great idea about it.
     
    peterson82, Jan 26, 2010 IP
  15. coolseo36

    coolseo36 Well-Known Member

    Messages:
    979
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    140
    #15
    I wonder if it allows to redirect to a directory instead of main domain
     
    coolseo36, Jan 26, 2010 IP
  16. TimothyJohn

    TimothyJohn Member

    Messages:
    786
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #16
    It may do. I'm not exactly sure. If in doubt google it haha
     
    TimothyJohn, Jan 26, 2010 IP