Installation Instructions:
1. Add this filter on IIS Isapi, filter name re, and select Rewrite.dll for executable file;
2. Set the httpd.ini file
RewriteRule/news/(/d+)/.html/jsp/news/.jsp/?id=$1[N,I]
Indicates converting news.jsp?id=95 to news/95.html
And so on, if you have more parameters, add the corresponding (/d+), and the following id=$1, add id=$2, etc.
Currently, the most common dynamic web pages include asp, php, jsp, shtml, jhtml, cgi... and even some of them defined by themselves, such as: aspx, do, index, hello, etc. The expression is: news.asp?id=95. It is recommended that readers convert it to news/95.html through re_write to facilitate Google's recognition of web pages.
re_write is a module in iis. You can download it from http://www.ZZcoo.com/re_write.zip, which contains relevant installation instructions.
When you need to map news.jsp?id=95 to news/95.html, just set the httpd.ini file:
RewriteRule/news/(/d+)/.html/news/.jsp/?id=$1[N,I]
This maps requests like /news/95.html to /news.jsp?id=95
Then you write at the connection: <ahref='/news/95.html'>95 News</a>.
If your news is read through a database loop, then the writing is:
While(rs.next())
{
Stringid=(String)rs.getString('id');
out.print('<ahef='/news/''+id+'.html>');
out.print('95News');
out.print('</a>');
}
If you are dealing with data page turn, then the writing method is:
More_<%=Page%>_<%=type%>.html (Note: page is the number of pages turned, type is the data type)
Expression form: More_1_95.html
If you turn to the next page, it is: More_2_95.html. If you continue the loop on the next page, it is:
More_3_95.html, and so on.
However, 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 to be passed, then add multiple (/d+), as follows:
RewriteRule/More_(/d+)_(/d+)_(/d+)/.html/jsp/more/.jsp/?page=$1&type=$2&type2=$3[N,I]
The expression form of page turn processing is: More_1_95.html