虚机还没开通,高手帮看看这.htaccess文件写的对不对,另外RewriteRule ^ 这个^是什么意思呢?
RewriteEngine On
 RewriteBase /
 RewriteBase /bbs# 根目录伪静态规则
 RewriteRule /index.html$ /index.php
 RewriteRule /(.*)/index\.html$ /index.php?# discuz x1.5伪静态规则,网上下载的 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
 RewriteCond %{QUERY_STRING} ^(.*)$
 RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1

解决方案 »

  1.   

    我在学Linux的时候用到过这个,不过没这么复杂啊。通过和.htpasswd的配合,直接就可以来控制用户登录了啊。
      

  2.   

    另外RewriteRule ^ 这个^是什么意思呢?代表匹配内容的最前端,也就是开头RewriteBase /
    RewriteBase /bbs只要一个就好bbs的可以放在bbs目录下重新写个.htaccess