Is 301 redirect for me?

Discussion in 'Apache' started by d0cpaul, Sep 21, 2009.

  1. #1
    I am running Linux on a Godaddy dedicated server and I was wondering if .htaccess would be right for me?

    I am currently running Vbulletin in a sub domain and I wanted to redirect visitors to my new forum. If so would I place my .htaccess file in my subdomain?

    Thanks!
     
    d0cpaul, Sep 21, 2009 IP
  2. ErikTheRed

    ErikTheRed Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yup, place the .htaccess file containing the 301 redirect in the subdomain's root directory.
     
    ErikTheRed, Sep 29, 2009 IP
  3. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    Let me understand: you need to redirect the visitors from the main domain (eg. www.example.com) to a subdomain (eg. forum.example.com) ?

    If yes, you need to put the .htaccess with 301 redirect in the root of the main domain.

    Have a nice day.
     
    D3xter, Oct 2, 2009 IP
  4. d0cpaul

    d0cpaul Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    Plans have changed.

    Instead of redirecting the whole forum which is www.loansafe.org/forum, I need to redirect each thread so I can keep my PageRank. How would I do this?
     
    d0cpaul, Oct 2, 2009 IP
  5. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    I can't visit your site to take a look (Sorry. The administrator has banned your IP address. To contact the administrator click here).

    Please be more specific (redirect from where to where).
     
    D3xter, Oct 2, 2009 IP
  6. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    Note 2: I think you need two .htaccess files, to keep old links from search engines:

    - one for redirecting from old location to new location (main root)
    - second for redirecting old links location to new location (forum root)

    Have a nice day.
     
    D3xter, Oct 2, 2009 IP
  7. d0cpaul

    d0cpaul Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    OK,

    Some of my threads in my forum rank high on google. (www.exmaple.com/forum/thread1)

    I wanted to redirect those threads to my new forum which are located on me new site. (www.exmaple2.com/forum/thread1)

    Would I use .htaccess to redirect those posts and if so how would i do this?

    Thank you.

    =]
     
    d0cpaul, Oct 2, 2009 IP
  8. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #8
    One more question: example1.com and example2.com are hosted in the same location or the new site will be hosted in another location ?

    It's important to know, for the .htaccess file and where you need to put it.
     
    D3xter, Oct 5, 2009 IP
  9. d0cpaul

    d0cpaul Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    example2.com is located in a different location from example1.com..
     
    d0cpaul, Oct 5, 2009 IP
  10. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #10
    Place this .htaccess the root of example1.com:

    Options +FollowSymLinks
    RewriteEngine on
    
    # example1.com : 301 redirect to example2.com
    RewriteCond %{HTTP_HOST} !^(www\.)example1\.com$ [NC]
    RewriteRule ^(.*)$ http://www.example2.com/$1 [L,R=301]
    
    Code (markup):
    This should be enough. On example2.com you don't need any changes if the forum structure remains the same.

    Have a nice day.
     
    D3xter, Oct 5, 2009 IP
  11. d0cpaul

    d0cpaul Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #11
    By using this .htaccess file in the root will it redirect individual posts to their new locations or do I need to think of another redirect?
     
    d0cpaul, Oct 12, 2009 IP
  12. D3xter

    D3xter Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    Using this will redirect each post from example1.com/{params} to example2.com/{params}.

    Have a nice day.
     
    D3xter, Oct 13, 2009 IP