IIS does not use rewrite to implement static page

Source: Internet
Author: User
IIS does not use rewrite to implement static pages. read IIS does not use rewrite to implement static pages. the static pages that use rewrite do not actually exist, and iisewrite is unstable often 404, so I got this article. Principle: 404 use PHP (Asp can also be used) for page types, and combine with thieves to achieve static page use discuz! Forum archiver example ">

The static page with rewrite does not actually exist, and iisewrite is unstable and often 404, so this article is available.

Principle: 404 use PHP (Asp can also be used) for page types and combine with thieves to achieve static page

Use discuz! Example of forum archiver:
404 program page: http://bbs.pkxp.com/error.php
Demo: http://bbs.pkxp.com/archiver/
Error. php source code:

$ Url = $ _ SERVER ['query _ string'];
$ Url = str_replace ("404;", "", $ url );
If (! Ereg ('archiveer', $ url ))
Echo "Error 404 ";
// Display content on the 404 error page
Else {
$ Url = str_replace ("archiver/", "archiver /? ", $ Url );
$ Str = file ("$ url ");
$ Count = count ($ str );
For ($ I = 0; $ I <$ count; $ I ++ ){
$ File. = $ str [$ I];
}
Echo $ file;
// Implement archiver /? Change xx.html to archiver/xx.html
}
?>

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.