ASP中伪静态规则配置文件httpd.ini写法
温馨提示:这篇文章已超过826天没有更新,请注意相关的内容是否还可用!
#不带参数直接转的
RewriteRule /index\.html /index\.asp
#带一个数字型参数的
RewriteRule /index-(\d+)\.html /index\.asp\?anid=$1
#带一个字母数字混和型参数的
RewriteRule /index-([0-9,a-z]*)\.html /index\.asp\?an1=$1
#带一个字母型参数的
RewriteRule /index_([a-z]*)\.html /index\.asp\?an=$1
#带一个数字型参数的
RewriteRule /products-(\d+)\.html /products\.asp\?id=$1
#带一个字母型参数加两个数字的
RewriteRule /class-([a-z]*)-(\d+)-(\d+)\.html /class\.asp\?lx=$1&anid=$2&nid=$3
还有一个 就是能通过httpd.ini实现空间绑定N个不同的网站 N=你空间所能绑定的域名数
RewriteCond Host: www\.ahaoyw\.com RewriteRule ^(.*)$ /xxxx/$1 [I]
其中www\.ahaoyw\.com 是你想绑定的域名 格式就照那样写 xxxx是这个域名所指向的目录。 通俗点理解等于 www.ahaoyw.com/xxxx/ 替换成 www.ahaoyw.com