Need some help with htaaccess rewrite rules

Discussion in 'Site & Server Administration' started by ~kev~, Feb 6, 2009.

  1. #1
    Lets give a basic layout of the site:

    Wordpress installed in the html root

    VBulletin installed in a /forum subfolder


    The problem:

    When typing in the address to the forum, if you do not put in the trailing / the URL is rewritten to http:// instead of www.

    Wordpress has its own .htaacces file in the html root and vbulletin has its own ,htaacces file in the /forum folder.

    This is the current vbulletin htaccess file

    AuthName http://www.fortresstraining.com/forum/
    
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^fortresstraining.com/forum/ [nc]
    rewriterule ^(.*)$ http://www.fortresstraining.com/forum/$1 [r=301,nc] 
    
    Options +FollowSymLinks 
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} ^fortresstraining.com/forum [NC] 
    RewriteRule ^(.*)$ http://www.fortresstraining.com/forum/$1 [L,R=301]
    
    RewriteEngine On
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    Code (markup):
    How do I make the htaaccess file stop rewritting the address? I want all urls to point to www regardless of how their typed in.
     
    ~kev~, Feb 6, 2009 IP