ISAPI_Rewrite伪静态设置生效后。浏览器显示地址为伪静态后的地址。IIS访问记录里面却还是原动态地址
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^/([0-9]+)\.html$ /Item\.aspx\?id=$1 [O,L]
RewriteRule ^(.*)/([0-9]+)_([0-9]+)\.html$ $1/Item\.aspx\?id=$2&page=$3 [O,L]
RewriteRule ^(.*)/Print/([0-9]+)\.html$ $1/Print\.aspx\?id=$2 [O,L]
RewriteRule ^(.*)/Print/([0-9]+)_([0-9]+)\.html$ $1/Print\.aspx\?id=$2&page=$3 [O,L]
RewriteRule ^(.*)/([0-9]+)/$ $1/Category\.aspx\?id=$2 [O,L]
RewriteRule ^(.*)/([0-9]+)/index\.html$ $1/Category\.aspx\?id=$2
RewriteRule ^(.*)/([0-9]+)/index_([0-9]+)\.html$ $1/Category\.aspx\?id=$2&page=$3 [O,L]
RewriteRule ^(.*)/C_([0-9]+)/([0-9]+)-(.*?)-(.*?)-([0-9]+)-([0-9]+)-([0-9]+)-(.*?)\.html$ $1/Category\.aspx\?id=$2&page=$3&tName=$4&TrademarkName=$5&OrderNo=$6&minPrice=$7&maxPrice=$8&filter=$9 [O,L]
RewriteRule ^(.*)/Z([0-9]+)/Index\.html$ $1/Special\.aspx\?id=$2&action=special [O,L]
RewriteRule ^(.*)/Z([0-9]+)/Index_([0-9]+)\.html$ $1/Special\.aspx\?id=$2&page=$3&action=special [O,L]
RewriteRule ^(.*)/ZT([0-9]+)/Index\.html$ $1/Special\.aspx\?id=$2&action=specialcategory [O,L]
RewriteRule ^(.*)/ZT([0-9]+)/Index_([0-9]+)\.html$ $1/Special\.aspx\?id=$2&page=$3&action=specialcategory [O,L]
RewriteRule ^(.*)/ZT/Index\.html$ $1/Special\.aspx [O,L]
RewriteRule ^(.*)/ZT/Index_([0-9]+)\.html$ $1/Special\.aspx\?page=$2 [O,L]
RewriteRule ^(.*)/Promotion_([0-9]+)_([0-9]+)\.html$ $1/Common/Promotion\.aspx\?id=$2&userId=$3 [O,L]
RewriteRule ^(.*)/Vote/VoteList_([0-9]+)\.html$ $1/Vote/VoteList\.aspx\?page=$2 [O,L]
RewriteRule ^(.*)/Category_-2/Index\.html$ $1/Default\.aspx [O,L]
RewriteRule ^(.*)/Category_-2/Index\.aspx$ $1/Default\.aspx [O,L]
# RewriteRule ^(.*)/Promotion_([0-9]+)_([0-9]+)\.html$ $1/Common/Promotion\.aspx\?id=$2&userId=$3
# RewriteRule ^(.*)/Promotion_([0-9]+)_([0-9]+)\.html$ $1/Common/Promotion\.aspx\?id=$2&userId=$3
# RewriteRule ^(.*)/Promotion_([0-9]+)_([0-9]+)\.html$ $1/Common/Promotion\.aspx\?id=$2&userId=$3
# RewriteRule ^(.*)/Promotion_([0-9]+)_([0-9]+)\.html$ $1/Common/Promotion\.aspx\?id=$2&userId=$3
# 301重定向
RewriteRule ^/Item/([0-9]+)\.html$ /$1\.html [L]
RewriteRule ^/Item/([0-9]+)\.aspx$ /$1\.html [L]
RewriteRule ^/([0-9]+)/index\.html$ /$1/ [L]
# 防盗链
# RewriteCond Host: (.+)
# RewriteCond Referer: (?!http://\1.*).*
# RewriteCond Referer: (?!http://(.*)(www\.hefeijz\.com|\.hefeijz\.com|\.baidu\.com|\.google\.com|\.google\.cn|\.g\.cn|\.gougou\.com|\.soso\.com|\.sogou\.com|\.youdao\.com|\.bing\.com|\.yahoo\.com|\.yahoo\.cn)).+
# RewriteRule .*\.(?:gif|jpg|png|jpeg|bmp|) /block.gif [I,O,N]
浏览器访问 http://www.hefeijz.com/2417.html时。浏览器地址栏中显示的 http://www.hefeijz.com/2417.html。查询IIS访问记录,里面却记录的/Item.aspx?id=2417
同期所有搜索引擎抓取页面的IIS记录 也都记录的Item.aspx?id=2417
链接形式。
不知道最后搜索引擎收录的页面是/Item.aspx?id=2417,还是/2417.html。
由于不确定到底收录哪种页面。目前把httpd.ini重命名了。使用的.NET进行URL重写。但是.NET的URL重写GZIP不生效。Rewrite设置URL重写时GZIP才生效。 望高手给我解惑