ASP's program can implement pseudo-static method _ Application Technique
Source: Internet
Author: User
Installation Instructions:
1, add this filter on the IIS ISAPI, filter name RE, executable file select Rewrite.dll;
2. Set up Httpd.ini file
rewriterule/news/(\d+) \.html/jsp/news\.jsp\?id=$1 [N,i]
Represents converting news.jsp?id=95 to news/95.html
And so on, if you have more parameters, then add the corresponding (\d+), and the back of the id=$1, then increase the id=$2, and so on.
Currently more popular dynamic Web pages include asp,php,jsp,shtml,jhtml,cgi ... There are even some of their own definition, such as: Aspx,do,index,hello and so on. The form of expression is: news.asp?id=95. The reader is advised to convert it to news/95.html through Re_write so that Google can identify the Web page.
Re_write is a module in IIS that you can download from Http://www.ZZcoo.com/re_write.zip with instructions for installation.
When you need to map news.jsp?id=95 to news/95.html, simply set the Httpd.ini file:
rewriterule/news/(\d+) \.html/news\.jsp\?id=$1 [N,i]
This maps a request like/news/95.html to a/news.jsp?id=95
Then you write at the junction: <a href= '/news/95.html ' >95 news </a>.
If your news is read through a database loop, then the writing is:
while (Rs.next ())
{
String id = (string) rs.getstring (' id ');
Out.print (' <a hef= '/news/' +id+ ' .html> ');
Out.print (' 95 news ');
Out.print (' </a> ');
}
If you are processing data paging, then the writing is:
more_<%=page%>_<%=type%>.html (Note: page is page number of pages, type is data type)
form of expression: more_1_95.html
If the next page is: more_2_95.html, continue to the next page of the loop, then:
More_3_95.html, and so on.
But you need to add the following code to the Httpd.ini file:
Rewriterule/more_ (\d+) _ (\d+) \.html/jsp/more\.jsp\?page=$1&type=$2 [N,i]
If your dynamic program has multiple parameters that need to be passed, add more than one (\d+), as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service