A brief discussion on the pseudo-static implementation of asp without any configuration
I searched for some information on the Internet, some adding filters, some using 404 error pages, and some using info/?1.html.
My actual situation: I helped a friend make a pseudo-static website. The virtual space function he used was too simple. The first method was impossible because IIS could not be operated. So I used the second method, finally debugged it locally, and happily uploaded it to ftp. After uploading, I tested it, and a 404 error was reported with just a little information. It was very depressing. Then I saw a message at the bottom of the space management custom error page. Tip: If you want to put it in the error folder, it can only be a .htm file. It’s so frustrating and all your work is in vain. So use the third one:
1. Create a new folder info (because the final page URL for accessing information is http://localhost/info/?1.html)
2. Create a new default.asp file in the info folder (the page on the default homepage)
The contents of the default.asp file are as follows
<%
CurrDomain=Request.ServerVariables(HTTP_HOST) 'Current access domain name
CurrURL=Replace(Request.ServerVariables(QUERY_STRING),404;http://&CurrDomain&/info/?,) 'Current access URL
id=replace(CurrURL,.html,)
%>
where id is the parameter passed in
If there are multiple parameters, you can make the URL pseudo-static to info/?1-2-3.html
Among them, 1, 2, and 3 each represent the value of three parameters, and the separated strings can be presented separately.
Done. . .