[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTPRewriteRule /ask/ask(\d+)\.html /ask/detail\.php\?aid=$1RewriteRule /group/(\d+) /group/groupmain\.php\?mainid=$1
RewriteRule /group/party(\d+)\.html /group/party\.php\?mainid=$1
RewriteRule /group/article(\d+)\.html /group/article\.php\?mainid=$1
RewriteRule /group/photo(\d+)\.html /group/photo\.php\?mainid=$1
RewriteRule /group/user(\d+)\.html /group/user\.php\?mainid=$1
RewriteRule /group/post(\d+)\.html /group/post\.php\?mainid=$1
RewriteRule /group/read(\d+)\.html /group/read\.php\?fid=$1
RewriteRule /group/partyshow(\d+)\.html /group/partyshow\.php\?fid=$1
RewriteRule /home/(\d+) /home/main\.php\?uid=$1
RewriteRule /home/myarchive(\d+)\.html /home/myarchive\.php\?uid=$1
RewriteRule /home/myvideo(\d+)\.html /home/myvideo\.php\?uid=$1
RewriteRule /home/myphoto(\d+)\.html /home/myphoto\.php\?uid=$1
RewriteRule /home/mydiary(\d+)\.html /home/mydiary\.php\?uid=$1
RewriteRule /home/myask(\d+)\.html /home/myask\.php\?uid=$1
RewriteRule /home/mydating(\d+)\.html /home/mydating\.php\?uid=$1
RewriteRule /home/myfriend(\d+)\.html /home/myfriend\.php\?uid=$1
RewriteRule /home/mybbs(\d+)\.html /home/mybbs\.php\?uid=$1
RewriteRule /home/mycontact(\d+)\.html /home/mycontact\.php\?uid=$1
RewriteRule /home/v(\d+)\.html /home/v\.php\?fid=$1
RewriteRule /home/p(\d+)\.html /home/p\.php\?fid=$1
RewriteRule /home/diary(\d+)\.html /home/diary\.php\?fid=$1
RewriteRule /home/ask(\d+)\.html /home/ask\.php\?fid=$1
RewriteRule /home/dating(\d+)\.html /home/dating\.php\?fid=$1
RewriteRule /home/([1-2]+)p(\d+)u(\d+)\.html /home/p\.php\?act=$1\&fid=$2&uid=$3RewriteRule /chat/(\d+)\.html /chat/index\.php\?uid=$1
RewriteRule /chat/chksend(\d+)\.html /chat/chksend\.php\?uid=$1
RewriteRule /bidderuser(\d+)\.html /bidderuser\.php\?uid=$1
RewriteRule /biddergroup(\d+)\.html /biddergroup\.php\?mainid=$1
RewriteRule /bidderdating(\d+)\.html /bidderdating\.php\?did=$1
RewriteRule /clinic/detail(\d+)\.html /clinic/detail\.php\?fid=$1
RewriteRule /story/detail(\d+)\.html /story/detail\.php\?fid=$1
RewriteRule /news(\d+)\.html /newsshow\.php\?id=$1怎么转换呢
我转换了2个 RewriteEngine onRewriteBase /home/
RewriteRule index.html$ /index.php
RewriteRule ([0-9])$ main.php?uid=$1RewriteBase /story/RewriteRule detail+([0-9]).html$ detail.php?fid=$1
发现RewriteRule detail+([0-9]).html$ detail.php?fid=$1有用  而第一个是没用的 
但是把“
RewriteBase /story/RewriteRule detail+([0-9]).html$ detail.php?fid=$1
” 去掉 第一个又有用了

解决方案 »

  1.   

    知道别人为什么不回你帖子吗?
    你写的内容太多了,不会提问题,高手的时间是不多的,菜鸟时间多但不懂。
    所以要精简问题:代码少帖点,问题描述细一点,分多一点。RewriteRule detail+([0-9]).html$ detail.php?fid=$1这里的.要加转义啊\.为什么上面都转义了,下面的不转义呢。
      

  2.   


    100分是个诱惑啊~~~~哈哈哈.htaccess 文件如下:<IfModule mod_expires.c>
    ExpiresByType text/html A1
    </IfModule>Options -Indexes
    DirectoryIndex index.html index.htm index.php index.cgi
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^ask/ask(\d+).html$ ask/detail.php?aid=$1 [L]
    RewriteRule ^group/(\d+)$  group/groupmain.php?mainid=$1 [L]#其他依次类推
      

  3.   

    2楼写的结尾掉了一个“</IfModule>”
    <IfModule mod_expires.c>
    ExpiresByType text/html A1
    </IfModule>Options -Indexes
    DirectoryIndex index.html index.htm index.php index.cgi
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^ask/ask(\d+).html$ ask/detail.php?aid=$1 [L]
    RewriteRule ^group/(\d+)$  group/groupmain.php?mainid=$1 [L]#其他依次类推
    </IfModule>