Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
I've got a free movie station recently. Ready to implement pseudo static. Because the server is not its own can not use the component. As long as it is written for a friend who uses a virtual host, does he have a server or a direct component?
On the internet to find a lot of pity is CTRL + C CTRL + V. The look is not quite clear.
This time I'll talk about it.
Like http://www.xuniwangluo.com/dy/play?action=cc&id=4003 to be converted to
Http://www.xuniwangluo.com/dy/play/?cc-4003.html this form of pseudo static
Then create a play directory in the play.asp directory.
And then copy the play.asp to the play directory renamed to Index.asp "Use of Windows does not allow directory vulnerabilities
Then insert the following code into the head of the index.asp code
Dim idc,id1,id2,id,action
Idc=request.servervariables ("Query_string")
Id1=replace (IDC, ". html", "")
Id2=split (ID1, "-")
Action=id2 (0)
Id=id2 (1)
Principle:
Dim idc,id1,id2,id,action ' Declare variable (you can change the ID action two parameters to the parameters you need)
Idc=request.servervariables ("Query_string") ' (intercept) the address at the back. such as http://www.xuniwangluo.com/dy/play/?cc-4003.html
Then IDC equals cc-4003.html.
Id1=replace (IDC, ". html", "") "(Id1 means to split IDC and. html so id1 is equal to cc-4003
Id2=split (ID1, "-") "(Id2 is the"-"as the center of the split Id1 Id2 is equal to CC 40,032 part
Action=id2 (0) ' (Action equals the first "-") the previous argument is CC
Id=id2 (1) ' (ID is equal to the first "-" parameter is 4003 (if you have the 3rd argument, you can write Canshu3=id (2)
Ok. In this case, the action ID two parameters can be read directly from the browser address and then passed to index.asp let index.asp read the data from the database and display the content
"-" can be modified to other parameters.
Then the address you visit should be http://www.xuniwangluo.com/play/?cc~4003.html.
It can also be modified by itself. HTML for other suffixes such as:. htm. php. shtml et cetera
This only provides an ASP pseudo static implementation. As for if all dynamic connection addresses are modified to pseudo static access. You need to modify the template of your website.
I hope this article is useful to everyone