Maison  >  Article  >  développement back-end  >  求个伪静态规则

求个伪静态规则

WBOY
WBOYoriginal
2016-06-23 14:05:52826parcourir

http://www.baidu.com/read/1/1000/index.html
http://www.baidu.com/read/2/2000/index.html 
http://www.baidu.com/read/30/30000/index.html 
伪静态后,需要能够实现      
http://www.baidu.com/read/1000/index.html
http://www.baidu.com/read/2000/index.html
http://www.baidu.com/read/30000/index.html


回复讨论(解决方案)

我给你我写过的伪静态示例,希望对你有用
httpd.ini

[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /index\.html /index\.asp 
RewriteRule  /Cpic_(\d+)\.html  /Cpic\.asp\?id=$1 
RewriteRule /Cpic_(\d+)_(\d+)\.html /Cpic\.asp\?page=$1&id=$2


.htaccess
RewriteEngine on
RewriteRule  ^map.html  /map.asp 
RewriteRule  ^Cxwnews_(\d+).html  /Cxwnews.asp?id=$1
RewriteRule  ^Cxwnews_(\d+)_(\d+).html /Cxwnews.asp?page=$1&id=$2

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn