<IfModule mod_rewrite.c>  
RewriteEngine On
RewriteRule   ^/([a-z]+)-([0-9]+)$   batch.common.php?action=$1&op=$2&itemid=$3&catid=$4
</IfModule>做参考,不一定正确。

解决方案 »

  1.   


    <IfModule mod_rewrite.c> 
    RewriteEngine on
    RewriteRule ([a-zA-Z]{1,})-([0-9]{1,})\.html$ batch.common.php?action=$1&itemid=$2
    </IfModule> 
      

  2.   


    <IfModule mod_rewrite.c> 
    RewriteEngine On
    RewriteRule  ^/([0-9A-Za-z]+)-([0-9A-Za-z]+)$  batch.common.php?action=$1&op=$2
    </IfModule> 
      

  3.   

    <IfModule mod_rewrite.c> 
    RewriteEngine On
    RewriteRule  ^viewnews-([0-9]{1,})$ /action=viewnews&op=up&itemid=$1&catid=93  [L]
    </IfModule> 
      

  4.   

    # 将 RewriteEngine 模式打开
    RewriteEngine On# 修改以下语句中的 / 为你的网站目录地址,如果程序放在二级目录中,如/php 请将 / 修改为 /php# 如果您在httpd.conf中已经设置了重写规则,请去掉下面的注释#RewriteBase /
    # Rewrite RulesRewriteRule ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?contentid=$2&page=$3
    RewriteRule ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3
    RewriteRule ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2