mod_rewrite + VbSEO

Discussion in 'Apache' started by N8*, Feb 14, 2006.

  1. #1
    After installing VBSEO, it seems to be applying it's re-write rules to all sub-directories on my website, causing problems when trying to download .zip files.

    Is there a way to make VBSEO only effect my root directory?


    
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums)
    #RewriteBase /
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]
    
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !chat
    RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    Code (markup):
     
    N8*, Feb 14, 2006 IP
  2. UKJay

    UKJay Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are your forums in a sub directory (eg /forums/)? If so, try uncommenting the #RewriteBase / line and adding your forums folder to the end eg
    RewriteBase /forums 
    Code (markup):
    . If not, the vbseo forums are good at answering queries - have you tried them?

    Regards

    Jay
     
    UKJay, Mar 30, 2006 IP