The Rewrite component is not required for pseudo-static IIS implementation.

Source: Internet
Author: User

Currently, all iis sites can customize the 404 error page, open the local IIS website, View Properties-custom error, find Error 404, and double-click to modify its message type to URL, the Url is set to the absolute path of the file under the root directory of the website.

For example, if you set the url of 404.asp to/404.aspunder the website directory, you can modify the url of 404.asp.

The principle is as follows:

For example, the homepage http: // www. **********. com/index. asp: the url format of the article is as follows: http: // www. **********. com/Class/show. asp? ID = 12345. When writing a program, you only need to intentionally set http: // www. ************. com/Class/show. asp? ID = 12345 is written as http: // www. ***********. com/show/12345.html

Http: // www. **********. com/show/12345.html. if you want to click this hyper-connection, the 404 error page will be automatically called as long as the 404 error page is defined as an asp page.

Add it to get show. asp? ID = 12345 page Id 12345 and then use the thief program to obtain the modified page content displayed at http: // www. **********. com/show/12345.html page. the http: // www. **********. com/show/12345.html http: // www. **********. com/Class/show. asp? ID = 12345 the two pages are the same. the following is the code of the 404 error page. You can write other applications by yourself. The following is a brief introduction: the code of the 404 error page is used to obtain the current URL value. For example:

Original Dynamic address: http: // www. *****. com/post. asp? Id = * enter a random address: http: // www. *****. com/post-id -*. the html page returns the following values: 404; http: // www. *****. com: 80/post-id -*. html

We can use replace to put 404; http: // www. *****. com: 80/post-id-filter, only the URL value is left *. html, and split it. mainly,

Finally, sURL (0) is equal to the value of *, and sURL (1) is equal to the value of html. the asp file code changes the obtained id value to sURL (0), and then saves the code on the 404 error page, which enables the website pseudo-static function.

In the end, if the vps and host you are using are correct, and if it is space, you need a custom 404 feature. Otherwise, you will not be able to use it. The article from Hefei anorectal Hospital: http://www.ylwltg.com, reproduced please indicate the source.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.