IIS to achieve pseudo-static do not need Rewrite components Now iis site can customize the 404 error page, open the local IIS site, view the properties - custom error, find 404 error, double-click to modify the message type URL, Url set as root Directory absolute path to the file.
For example, set the site more directory 404.asp set url to / 404.asp, mainly to modify our modify 404.asp
The principle is as follows
For example, the home page http: //www.**********.com/index.asp, the URL of the article as follows http: //www.**********.com/ Class / show.asp? ID = 12345, write the program as long as deliberately http: //www.**********.com/Class/show.asp? ID = 12345 written, http: // www. **********. com / show / 12345.html
In fact, there is no http: //www.**********.com/show/12345.html this page. Users want to click on this hyperlink, it will automatically call the 404 error page as long as the 404 error reported The page is defined as asp page on it.
Which joined the show.asp? ID = 12345 page Id 12345 Then use the thief to get the contents of the page to change shown in http: //www.**********.com/show/12345.html page On which the most intercepted with / show / and. Html pages if not less than normal err.html error page test address http: //www.**********.com /show/12345.html http: //www.**********.com/Class/show.asp? ID = 12345 The two pages are the same. The following is the 404 error page code to Write other applications are also OK, following a brief introduction: The above is the 404 error page code, get the current value of the URL statement, for example:
The original dynamic address: http: //www.*****.com/post.asp? Id = * just enter an address: http://www.*****.com/post-id-*. html page will return the value: 404; http: //www.*****.com: 80 / post-id - *. html
We can use the replace to 404; http: //www.*****.com: 80 / post-id-filter, the URL value only * .html, and then split it apart. Based,
That last is, sURL (0) is equal to get the value of *, sURL (1) equal to get the value of html, we get the original post.asp file code to get the id value sURL (0), and then save the code in the 404 error Page, which implements the website pseudo-static function
Finally, if you use the vps and the host is no problem, if it is space you need to have a custom 404 function otherwise there is no way to use.