求一句IIS静态规则
要求能产生这样的链接
http://www.abc.cn/pagetype-bbsthread-and-tid-3187.html
http://www.abc.cn/pagetype-bbsthread-and-tid-3187-and-page-0.html
http://www.abc.cn/pagetype-bbsforum-and-fid-13.html
http://www.abc.cn/pagetype-bbsforum-and-fid-13-and-page-2.html ;
其要代替的地址是
http://www.abc.cn/dpindex.php?pagetype-bbsthread-and-tid-3187.html
http://www.abc.cn/dpindex.php?pagetype-bbsthread-and-tid-3187-and-page-0.html
http://www.abc.cn/dpindex.php?pagetype-bbsforum-and-fid-13.html
http://www.abc.cn/dpindex.php?pagetype-bbsforum-and-fid-13-and-page-2.html ;
RewriteRule ^(.*)/pagetype-bbsforum-and-fid-([0-9]+)\.html$ $1/dpindex\.php\?pagetype-bbsforum-and-fid-$2.html
RewriteRule ^(.*)/pagetype-bbsforum-and-fid-([0-9]+)-and-page-([0-9]+)\.html$ $1/dpindex\.php\?pagetype-bbsforum-and-fid-$2-and-page-$3.html
RewriteRule ^(.*)/pagetype-bbsthread-and-tid-([0-9]+)\.html$ $1/dpindex\.php\?pagetype-bbsthread-and-tid-$2.html
RewriteRule ^(.*)/pagetype-bbsthread-and-tid-([0-9]+)-and-page-([0-9]+)\.html$ $1/dpindex\.php\?pagetype-bbsthread-and-tid-$2-and-page-$3.html ;
这个是朋友写的IIS静态规则,但有4条,我觉得太多,能不能写成一条?
RewriteRule ^(.*)/(pagetype\-+[a-z0-9\-]+\.html)$ $1/dpindex.php?$2 ;
这个是apache里的规则
请各位高手帮忙写一个!谢谢了!
[
本帖最后由 klgd 于 2007-7-18 19:09 编辑 ]