伪静态求规划写法 求伪静态规则写法 40
asp伪静态求写法/About/About.asp?id=1------/About/1.html/Product/Product.asp?bigClassID=69--...
asp伪静态求写法
/About/About.asp?id=1 ------ /About/1.html
/Product/Product.asp?bigClassID=69------------/Product/list_69.html
/Product/ProductInfo.asp?ProductID=233-----------/Product/233.html
/News/NewsInfo.asp?newsID=434&classID=62-----/News/62-434.html 展开
/About/About.asp?id=1 ------ /About/1.html
/Product/Product.asp?bigClassID=69------------/Product/list_69.html
/Product/ProductInfo.asp?ProductID=233-----------/Product/233.html
/News/NewsInfo.asp?newsID=434&classID=62-----/News/62-434.html 展开
1个回答
展开全部
这要要服务器配置
IIS6下,ASP伪静态规则:
IIS6.0
为伪静态规则要写在httpd.ini 中,httpd.ini要上传到网站根目录
httpd.ini
内容开始:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
RewriteRule ^(.*)/index\.asp $1/index.html
RewriteRule ^(.*)/([0-9]*).html $1/article.asp\?id=$2
RewriteRule ^(.*)/([a-z]*)/([a-z]*)/ $1/list.asp\?x=$2&y=$3
httpd.ini
内容结束
说明:
RewriteRule ^(.*)/index\.asp $1/index.html
是将
index.asp
伪静态为
index.html
RewriteRule ^(.*)/([0-9]*).html $1/article.asp\?id=$2
文章页伪静态,把article.asp\?id=xxx映射成/xxx.html ,其中xxx为文章ID号,在article.asp中接收
id, id=request("id"), 根据ID有数据库中取数据即可
IIS6下,ASP伪静态规则:
IIS6.0
为伪静态规则要写在httpd.ini 中,httpd.ini要上传到网站根目录
httpd.ini
内容开始:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
RewriteRule ^(.*)/index\.asp $1/index.html
RewriteRule ^(.*)/([0-9]*).html $1/article.asp\?id=$2
RewriteRule ^(.*)/([a-z]*)/([a-z]*)/ $1/list.asp\?x=$2&y=$3
httpd.ini
内容结束
说明:
RewriteRule ^(.*)/index\.asp $1/index.html
是将
index.asp
伪静态为
index.html
RewriteRule ^(.*)/([0-9]*).html $1/article.asp\?id=$2
文章页伪静态,把article.asp\?id=xxx映射成/xxx.html ,其中xxx为文章ID号,在article.asp中接收
id, id=request("id"), 根据ID有数据库中取数据即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |