VBSEO的.htaccess配置疑问

本帖由 撒哈拉企鹅2009-05-02 发布。版面名称:vBulletin 编程讨论

  1. 撒哈拉企鹅

    撒哈拉企鹅 普通会员

    大家好,我在网站根目录下下设了一个“forum”的目录来放置vb论坛,并指定一个forum.xxx.cn的子域名指向这个目录,我把.htaccess放置在“forum”目录下,访问OK!但原来的首页forum.xxx.cn变成的forum.xxx.cn/forum ,怎么多出一个forum来呢?
    代码:
    # 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 /
    
    #RewriteCond %{HTTP_HOST} !^www\.devbeta\.cn
    #RewriteRule (.*) http://www.devbeta.cn/forum/$1 [L,R=301]
    #RewriteCond %{HTTP_HOST} !^forum [NC]
    #RewriteCond %{HTTP_HOST} !^$
    #RewriteRule ^(.*)$ http://forum.devbeta.cn/$1 [R=301,L]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    
    
     
  2. jack

    jack 正式会员

    #RewriteCond %{HTTP_HOST} !^forum [NC] 改为#RewriteCond %{HTTP_HOST} !^ [NC]
    OK
     
  3. 撒哈拉企鹅

    撒哈拉企鹅 普通会员

    这一行我注释了,不起作用的
     
正在加载...