[HELP] What is the rewrite rules for domain.com/forums to www.domain.com/forums?

Discussion in 'vBulletin Discussions' started by ahheng, Jul 4, 2010.

  1. ahheng

    ahheng Newcomer

    Joined:
    Dec 11, 2009
    Messages:
    14
    Likes Received:
    0
    Hi guys, I need help. i installed wordpress on my main domain which is sgpspclub.com, and i have moved my forum to "sgpspclub.com/forums". can someone give me the rewrite codes for directing non-www -->> domain.com/forums to www.domain.com/forums?

    Example, when people type domain.com/forums it will direct them to www.domain.com/forums.

    My main root htaccess is using the below codes:

    Code:
     
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    my public_html/forums htaccess is using the below codes:

    Code:
     
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com
    RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L] 
    
    But it still dont work at all. it will direct me to http://www.domain.com//home/psp/public_html/forums any ideas?
     
  2. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,706
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    this is what I have

    Code:
    RewriteCond %{HTTP_HOST} !^www\.general-forums\.com
    RewriteRule (.*) http://www.general-forums.com/$1 [L,R=301]
     
  3. ahheng

    ahheng Newcomer

    Joined:
    Dec 11, 2009
    Messages:
    14
    Likes Received:
    0
    I tried your codes on public_html/forums. but it dont work at all, it will just direct me to http://www.domain.com//home/psp/public_html/forums :(
     
  4. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,706
    Location:
    Topeka, Kansas
    First Name:
    Brandon

Share This Page